forked from OSchip/llvm-project
[X86] rdrand-builtins.c - add 32-bit target coverage and enable -Wall/-Werror
This commit is contained in:
parent
f4183441d4
commit
2cd080c884
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -target-feature +rdrnd -target-feature +rdseed -emit-llvm -o - %s | FileCheck %s
|
||||
|
||||
// RUN: %clang_cc1 -no-opaque-pointers -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +rdrnd -target-feature +rdseed -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,X64
|
||||
// RUN: %clang_cc1 -no-opaque-pointers -ffreestanding %s -triple=i386-unknown-unknown -target-feature +rdrnd -target-feature +rdseed -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
|
@ -20,9 +20,9 @@ int rdrand32(unsigned *p) {
|
|||
#if __x86_64__
|
||||
int rdrand64(unsigned long long *p) {
|
||||
return _rdrand64_step(p);
|
||||
// CHECK: @rdrand64
|
||||
// CHECK: call { i64, i32 } @llvm.x86.rdrand.64
|
||||
// CHECK: store i64
|
||||
// X64: @rdrand64
|
||||
// X64: call { i64, i32 } @llvm.x86.rdrand.64
|
||||
// X64: store i64
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -43,8 +43,8 @@ int rdseed32(unsigned *p) {
|
|||
#if __x86_64__
|
||||
int rdseed64(unsigned long long *p) {
|
||||
return _rdseed64_step(p);
|
||||
// CHECK: @rdseed64
|
||||
// CHECK: call { i64, i32 } @llvm.x86.rdseed.64
|
||||
// CHECK: store i64
|
||||
// X64: @rdseed64
|
||||
// X64: call { i64, i32 } @llvm.x86.rdseed.64
|
||||
// X64: store i64
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue