1 ; Make sure this testcase is supported by all code generators
4 declare i64 @llvm.ctpop.i64(i64)
6 declare i32 @llvm.ctpop.i32(i32)
8 declare i16 @llvm.ctpop.i16(i16)
10 declare i8 @llvm.ctpop.i8(i8)
12 define void @ctpoptest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
13 %a = call i8 @llvm.ctpop.i8( i8 %A ) ; <i8> [#uses=1]
14 %b = call i16 @llvm.ctpop.i16( i16 %B ) ; <i16> [#uses=1]
15 %c = call i32 @llvm.ctpop.i32( i32 %C ) ; <i32> [#uses=1]
16 %d = call i64 @llvm.ctpop.i64( i64 %D ) ; <i64> [#uses=1]
18 store i16 %b, i16* %BP
19 store i32 %c, i32* %CP
20 store i64 %d, i64* %DP
24 declare i64 @llvm.ctlz.i64(i64, i1)
26 declare i32 @llvm.ctlz.i32(i32, i1)
28 declare i16 @llvm.ctlz.i16(i16, i1)
30 declare i8 @llvm.ctlz.i8(i8, i1)
32 define void @ctlztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
33 %a = call i8 @llvm.ctlz.i8( i8 %A, i1 true ) ; <i8> [#uses=1]
34 %b = call i16 @llvm.ctlz.i16( i16 %B, i1 true ) ; <i16> [#uses=1]
35 %c = call i32 @llvm.ctlz.i32( i32 %C, i1 true ) ; <i32> [#uses=1]
36 %d = call i64 @llvm.ctlz.i64( i64 %D, i1 true ) ; <i64> [#uses=1]
38 store i16 %b, i16* %BP
39 store i32 %c, i32* %CP
40 store i64 %d, i64* %DP
44 declare i64 @llvm.cttz.i64(i64, i1)
46 declare i32 @llvm.cttz.i32(i32, i1)
48 declare i16 @llvm.cttz.i16(i16, i1)
50 declare i8 @llvm.cttz.i8(i8, i1)
52 define void @cttztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
53 %a = call i8 @llvm.cttz.i8( i8 %A, i1 true ) ; <i8> [#uses=1]
54 %b = call i16 @llvm.cttz.i16( i16 %B, i1 true ) ; <i16> [#uses=1]
55 %c = call i32 @llvm.cttz.i32( i32 %C, i1 true ) ; <i32> [#uses=1]
56 %d = call i64 @llvm.cttz.i64( i64 %D, i1 true ) ; <i64> [#uses=1]
58 store i16 %b, i16* %BP
59 store i32 %c, i32* %CP
60 store i64 %d, i64* %DP