1 ; Make sure this testcase is supported by all code generators
2 ; RUN: llvm-upgrade < %s | llvm-as | llc
4 declare ulong %llvm.ctpop.i64(ulong)
5 declare uint %llvm.ctpop.i32(uint)
6 declare ushort %llvm.ctpop.i16(ushort)
7 declare ubyte %llvm.ctpop.i8(ubyte)
9 void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D,
10 ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
11 %a = call ubyte %llvm.ctpop.i8(ubyte %A)
12 %b = call ushort %llvm.ctpop.i16(ushort %B)
13 %c = call uint %llvm.ctpop.i32(uint %C)
14 %d = call ulong %llvm.ctpop.i64(ulong %D)
16 store ubyte %a, ubyte* %AP
17 store ushort %b, ushort* %BP
18 store uint %c, uint* %CP
19 store ulong %d, ulong* %DP
23 declare ulong %llvm.ctlz.i64(ulong)
24 declare uint %llvm.ctlz.i32(uint)
25 declare ushort %llvm.ctlz.i16(ushort)
26 declare ubyte %llvm.ctlz.i8(ubyte)
28 void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D,
29 ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
30 %a = call ubyte %llvm.ctlz.i8(ubyte %A)
31 %b = call ushort %llvm.ctlz.i16(ushort %B)
32 %c = call uint %llvm.ctlz.i32(uint %C)
33 %d = call ulong %llvm.ctlz.i64(ulong %D)
35 store ubyte %a, ubyte* %AP
36 store ushort %b, ushort* %BP
37 store uint %c, uint* %CP
38 store ulong %d, ulong* %DP
42 declare ulong %llvm.cttz.i64(ulong)
43 declare uint %llvm.cttz.i32(uint)
44 declare ushort %llvm.cttz.i16(ushort)
45 declare ubyte %llvm.cttz.i8(ubyte)
47 void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D,
48 ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
49 %a = call ubyte %llvm.cttz.i8(ubyte %A)
50 %b = call ushort %llvm.cttz.i16(ushort %B)
51 %c = call uint %llvm.cttz.i32(uint %C)
52 %d = call ulong %llvm.cttz.i64(ulong %D)
54 store ubyte %a, ubyte* %AP
55 store ushort %b, ushort* %BP
56 store uint %c, uint* %CP
57 store ulong %d, ulong* %DP