diff options
Diffstat (limited to 'test/CodeGen/builtin-count-zeros.c')
-rw-r--r-- | test/CodeGen/builtin-count-zeros.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/CodeGen/builtin-count-zeros.c b/test/CodeGen/builtin-count-zeros.c index 5a0be2f..acd22e6 100644 --- a/test/CodeGen/builtin-count-zeros.c +++ b/test/CodeGen/builtin-count-zeros.c @@ -1,4 +1,8 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'cttz' | count 2 -// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'ctlz' | count 2 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple arm-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-ARM int a(int a) {return __builtin_ctz(a) + __builtin_clz(a);} +// CHECK: call i32 @llvm.cttz.i32({{.*}}, i1 true) +// CHECK: call i32 @llvm.ctlz.i32({{.*}}, i1 true) +// CHECK-ARM: call i32 @llvm.cttz.i32({{.*}}, i1 false) +// CHECK-ARM: call i32 @llvm.ctlz.i32({{.*}}, i1 false) |