diff options
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/2003-08-06-BuiltinSetjmpLongjmp.c | 15 | ||||
-rw-r--r-- | test/CodeGen/builtins.c | 3 |
2 files changed, 3 insertions, 15 deletions
diff --git a/test/CodeGen/2003-08-06-BuiltinSetjmpLongjmp.c b/test/CodeGen/2003-08-06-BuiltinSetjmpLongjmp.c deleted file mode 100644 index 3aa5c00397..0000000000 --- a/test/CodeGen/2003-08-06-BuiltinSetjmpLongjmp.c +++ /dev/null @@ -1,15 +0,0 @@ -/* RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s - * - * __builtin_longjmp/setjmp should get transformed into intrinsics. - */ - -// CHECK-NOT: builtin_longjmp - -void jumpaway(int *ptr) { - __builtin_longjmp(ptr,1); -} - -int main(void) { - __builtin_setjmp(0); - jumpaway(0); -} diff --git a/test/CodeGen/builtins.c b/test/CodeGen/builtins.c index 1ab29a659b..bf7874b088 100644 --- a/test/CodeGen/builtins.c +++ b/test/CodeGen/builtins.c @@ -220,6 +220,8 @@ void test_float_builtin_ops(float F, double D, long double LD) { // CHECK: call x86_fp80 @llvm.fabs.f80(x86_fp80 } +// __builtin_longjmp isn't supported on all platforms, so only test it on X86. +#ifdef __x86_64__ // CHECK-LABEL: define void @test_builtin_longjmp void test_builtin_longjmp(void **buffer) { // CHECK: [[BITCAST:%.*]] = bitcast @@ -227,6 +229,7 @@ void test_builtin_longjmp(void **buffer) { __builtin_longjmp(buffer, 1); // CHECK-NEXT: unreachable } +#endif // CHECK-LABEL: define i64 @test_builtin_readcyclecounter long long test_builtin_readcyclecounter() { |