1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
; Make sure this testcase is supported by all code generators
; RUN: llc < %s
declare i64 @llvm.ctpop.i64(i64)
declare i32 @llvm.ctpop.i32(i32)
declare i16 @llvm.ctpop.i16(i16)
declare i8 @llvm.ctpop.i8(i8)
define void @ctpoptest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
%a = call i8 @llvm.ctpop.i8( i8 %A ) ; <i8> [#uses=1]
%b = call i16 @llvm.ctpop.i16( i16 %B ) ; <i16> [#uses=1]
%c = call i32 @llvm.ctpop.i32( i32 %C ) ; <i32> [#uses=1]
%d = call i64 @llvm.ctpop.i64( i64 %D ) ; <i64> [#uses=1]
store i8 %a, i8* %AP
store i16 %b, i16* %BP
store i32 %c, i32* %CP
store i64 %d, i64* %DP
ret void
}
declare i64 @llvm.ctlz.i64(i64)
declare i32 @llvm.ctlz.i32(i32)
declare i16 @llvm.ctlz.i16(i16)
declare i8 @llvm.ctlz.i8(i8)
define void @ctlztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
%a = call i8 @llvm.ctlz.i8( i8 %A ) ; <i8> [#uses=1]
%b = call i16 @llvm.ctlz.i16( i16 %B ) ; <i16> [#uses=1]
%c = call i32 @llvm.ctlz.i32( i32 %C ) ; <i32> [#uses=1]
%d = call i64 @llvm.ctlz.i64( i64 %D ) ; <i64> [#uses=1]
store i8 %a, i8* %AP
store i16 %b, i16* %BP
store i32 %c, i32* %CP
store i64 %d, i64* %DP
ret void
}
declare i64 @llvm.cttz.i64(i64)
declare i32 @llvm.cttz.i32(i32)
declare i16 @llvm.cttz.i16(i16)
declare i8 @llvm.cttz.i8(i8)
define void @cttztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
%a = call i8 @llvm.cttz.i8( i8 %A ) ; <i8> [#uses=1]
%b = call i16 @llvm.cttz.i16( i16 %B ) ; <i16> [#uses=1]
%c = call i32 @llvm.cttz.i32( i32 %C ) ; <i32> [#uses=1]
%d = call i64 @llvm.cttz.i64( i64 %D ) ; <i64> [#uses=1]
store i8 %a, i8* %AP
store i16 %b, i16* %BP
store i32 %c, i32* %CP
store i64 %d, i64* %DP
ret void
}
|