aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/rdrand-builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/rdrand-builtins.c')
-rw-r--r--test/CodeGen/rdrand-builtins.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/test/CodeGen/rdrand-builtins.c b/test/CodeGen/rdrand-builtins.c
index b7970f4dd4..15414a3345 100644
--- a/test/CodeGen/rdrand-builtins.c
+++ b/test/CodeGen/rdrand-builtins.c
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +rdrnd -emit-llvm -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +rdrnd -target-feature +rdseed -emit-llvm -o - %s | FileCheck %s
// Don't include mm_malloc.h, it's system specific.
#define __MM_MALLOC_H
-#include <immintrin.h>
+#include <x86intrin.h>
int rdrand16(unsigned short *p) {
return _rdrand16_step(p);
@@ -25,3 +25,24 @@ int rdrand64(unsigned long long *p) {
// CHECK: call { i64, i32 } @llvm.x86.rdrand.64
// CHECK: store i64
}
+
+int rdseed16(unsigned short *p) {
+ return _rdseed16_step(p);
+// CHECK: @rdseed16
+// CHECK: call { i16, i32 } @llvm.x86.rdseed.16
+// CHECK: store i16
+}
+
+int rdseed32(unsigned *p) {
+ return _rdseed32_step(p);
+// CHECK: @rdseed32
+// CHECK: call { i32, i32 } @llvm.x86.rdseed.32
+// CHECK: store i32
+}
+
+int rdseed64(unsigned long long *p) {
+ return _rdseed64_step(p);
+// CHECK: @rdseed64
+// CHECK: call { i64, i32 } @llvm.x86.rdseed.64
+// CHECK: store i64
+}