minix/external/bsd/llvm/dist/clang/test/CodeGen/builtin-count-zeros.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

8 lines
464 B
C

// 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)