[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / mips-count-builtins.c
blob7c9a2574809fb7c1fb7f089c5cb14a6a10eeaa8d
1 // RUN: %clang_cc1 %s -triple mips-unknown-linux-gnu -emit-llvm -o - | FileCheck %s
2 //
3 // Test that the ctlz and cttz builtins are defined for zero.
4 // Based on count-builtin.c
6 int leading, trailing, pop;
8 void test_i16(short P) {
9 leading = __builtin_clzs(P);
10 trailing = __builtin_ctzs(P);
12 // CHECK: @test_i16
13 // CHECK: call i16 @llvm.ctlz.i16(i16 {{.*}}, i1 false)
14 // CHECK: call i16 @llvm.cttz.i16(i16 {{.*}}, i1 false)
17 void test_i32(int P) {
18 leading = __builtin_clz(P);
19 trailing = __builtin_ctz(P);
21 // CHECK: @test_i32
22 // CHECK: call i32 @llvm.ctlz.i32(i32 {{.*}}, i1 false)
23 // CHECK: call i32 @llvm.cttz.i32(i32 {{.*}}, i1 false)
26 void test_i64(float P) {
27 leading = __builtin_clzll(P);
28 trailing = __builtin_ctzll(P);
29 // CHECK: @test_i64
30 // CHECK: call i64 @llvm.ctlz.i64(i64 {{.*}}, i1 false)
31 // CHECK: call i64 @llvm.cttz.i64(i64 {{.*}}, i1 false)