|
1 | | -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -fclangir -emit-cir %s -o %t.cir |
2 | | -// RUN: FileCheck --input-file=%t.cir %s |
| 1 | +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir |
| 2 | +// RUN: FileCheck %s --check-prefix=CIR --input-file=%t.cir |
3 | 3 |
|
4 | 4 | int test_builtin_clrsb(int x) { |
5 | 5 | return __builtin_clrsb(x); |
6 | 6 | } |
7 | 7 |
|
8 | | -// CHECK: cir.func @_Z18test_builtin_clrsbi |
9 | | -// CHECK: %{{.+}} = cir.bit.clrsb(%{{.+}} : !s32i) : !s32i |
10 | | -// CHECK: } |
| 8 | +// CIR: cir.func @_Z18test_builtin_clrsbi |
| 9 | +// CIR: %{{.+}} = cir.bit.clrsb(%{{.+}} : !s32i) : !s32i |
| 10 | +// CIR: } |
11 | 11 |
|
12 | 12 | int test_builtin_clrsbl(long x) { |
13 | 13 | return __builtin_clrsbl(x); |
14 | 14 | } |
15 | 15 |
|
16 | | -// CHECK: cir.func @_Z19test_builtin_clrsbll |
17 | | -// CHECK: %{{.+}} = cir.bit.clrsb(%{{.+}} : !s64i) : !s32i |
18 | | -// CHECK: } |
| 16 | +// CIR: cir.func @_Z19test_builtin_clrsbll |
| 17 | +// CIR: %{{.+}} = cir.bit.clrsb(%{{.+}} : !s64i) : !s32i |
| 18 | +// CIR: } |
19 | 19 |
|
20 | 20 | int test_builtin_clrsbll(long long x) { |
21 | 21 | return __builtin_clrsbll(x); |
22 | 22 | } |
23 | 23 |
|
24 | | -// CHECK: cir.func @_Z20test_builtin_clrsbllx |
25 | | -// CHECK: %{{.+}} = cir.bit.clrsb(%{{.+}} : !s64i) : !s32i |
26 | | -// CHECK: } |
| 24 | +// CIR: cir.func @_Z20test_builtin_clrsbllx |
| 25 | +// CIR: %{{.+}} = cir.bit.clrsb(%{{.+}} : !s64i) : !s32i |
| 26 | +// CIR: } |
27 | 27 |
|
28 | 28 | int test_builtin_ctzs(unsigned short x) { |
29 | 29 | return __builtin_ctzs(x); |
30 | 30 | } |
31 | 31 |
|
32 | | -// CHECK: cir.func @_Z17test_builtin_ctzst |
33 | | -// CHECK: %{{.+}} = cir.bit.ctz(%{{.+}} : !u16i) : !s32i |
| 32 | +// CIR: cir.func @_Z17test_builtin_ctzst |
| 33 | +// CIR: %{{.+}} = cir.bit.ctz(%{{.+}} : !u16i) : !s32i |
34 | 34 | // CHEKC: } |
35 | 35 |
|
36 | 36 | int test_builtin_ctz(unsigned x) { |
37 | 37 | return __builtin_ctz(x); |
38 | 38 | } |
39 | 39 |
|
40 | | -// CHECK: cir.func @_Z16test_builtin_ctzj |
41 | | -// CHECK: %{{.+}} = cir.bit.ctz(%{{.+}} : !u32i) : !s32i |
42 | | -// CHECK: } |
| 40 | +// CIR: cir.func @_Z16test_builtin_ctzj |
| 41 | +// CIR: %{{.+}} = cir.bit.ctz(%{{.+}} : !u32i) : !s32i |
| 42 | +// CIR: } |
43 | 43 |
|
44 | 44 | int test_builtin_ctzl(unsigned long x) { |
45 | 45 | return __builtin_ctzl(x); |
46 | 46 | } |
47 | 47 |
|
48 | | -// CHECK: cir.func @_Z17test_builtin_ctzlm |
49 | | -// CHECK: %{{.+}} = cir.bit.ctz(%{{.+}} : !u64i) : !s32i |
50 | | -// CHECK: } |
| 48 | +// CIR: cir.func @_Z17test_builtin_ctzlm |
| 49 | +// CIR: %{{.+}} = cir.bit.ctz(%{{.+}} : !u64i) : !s32i |
| 50 | +// CIR: } |
51 | 51 |
|
52 | 52 | int test_builtin_ctzll(unsigned long long x) { |
53 | 53 | return __builtin_ctzll(x); |
54 | 54 | } |
55 | 55 |
|
56 | | -// CHECK: cir.func @_Z18test_builtin_ctzlly |
57 | | -// CHECK: %{{.+}} = cir.bit.ctz(%{{.+}} : !u64i) : !s32i |
58 | | -// CHECK: } |
| 56 | +// CIR: cir.func @_Z18test_builtin_ctzlly |
| 57 | +// CIR: %{{.+}} = cir.bit.ctz(%{{.+}} : !u64i) : !s32i |
| 58 | +// CIR: } |
59 | 59 |
|
60 | 60 | int test_builtin_ctzg(unsigned x) { |
61 | 61 | return __builtin_ctzg(x); |
62 | 62 | } |
63 | 63 |
|
64 | | -// CHECK: cir.func @_Z17test_builtin_ctzgj |
65 | | -// CHECK: %{{.+}} = cir.bit.ctz(%{{.+}} : !u32i) : !s32i |
66 | | -// CHECK: } |
| 64 | +// CIR: cir.func @_Z17test_builtin_ctzgj |
| 65 | +// CIR: %{{.+}} = cir.bit.ctz(%{{.+}} : !u32i) : !s32i |
| 66 | +// CIR: } |
67 | 67 |
|
68 | 68 | int test_builtin_clzs(unsigned short x) { |
69 | 69 | return __builtin_clzs(x); |
70 | 70 | } |
71 | 71 |
|
72 | | -// CHECK: cir.func @_Z17test_builtin_clzst |
73 | | -// CHECK: %{{.+}} = cir.bit.clz(%{{.+}} : !u16i) : !s32i |
74 | | -// CHECK: } |
| 72 | +// CIR: cir.func @_Z17test_builtin_clzst |
| 73 | +// CIR: %{{.+}} = cir.bit.clz(%{{.+}} : !u16i) : !s32i |
| 74 | +// CIR: } |
75 | 75 |
|
76 | 76 | int test_builtin_clz(unsigned x) { |
77 | 77 | return __builtin_clz(x); |
78 | 78 | } |
79 | 79 |
|
80 | | -// CHECK: cir.func @_Z16test_builtin_clzj |
81 | | -// CHECK: %{{.+}} = cir.bit.clz(%{{.+}} : !u32i) : !s32i |
82 | | -// CHECK: } |
| 80 | +// CIR: cir.func @_Z16test_builtin_clzj |
| 81 | +// CIR: %{{.+}} = cir.bit.clz(%{{.+}} : !u32i) : !s32i |
| 82 | +// CIR: } |
83 | 83 |
|
84 | 84 | int test_builtin_clzl(unsigned long x) { |
85 | 85 | return __builtin_clzl(x); |
86 | 86 | } |
87 | 87 |
|
88 | | -// CHECK: cir.func @_Z17test_builtin_clzlm |
89 | | -// CHECK: %{{.+}} = cir.bit.clz(%{{.+}} : !u64i) : !s32i |
90 | | -// CHECK: } |
| 88 | +// CIR: cir.func @_Z17test_builtin_clzlm |
| 89 | +// CIR: %{{.+}} = cir.bit.clz(%{{.+}} : !u64i) : !s32i |
| 90 | +// CIR: } |
91 | 91 |
|
92 | 92 | int test_builtin_clzll(unsigned long long x) { |
93 | 93 | return __builtin_clzll(x); |
94 | 94 | } |
95 | 95 |
|
96 | | -// CHECK: cir.func @_Z18test_builtin_clzlly |
97 | | -// CHECK: %{{.+}} = cir.bit.clz(%{{.+}} : !u64i) : !s32i |
98 | | -// CHECK: } |
| 96 | +// CIR: cir.func @_Z18test_builtin_clzlly |
| 97 | +// CIR: %{{.+}} = cir.bit.clz(%{{.+}} : !u64i) : !s32i |
| 98 | +// CIR: } |
99 | 99 |
|
100 | 100 | int test_builtin_clzg(unsigned x) { |
101 | 101 | return __builtin_clzg(x); |
102 | 102 | } |
103 | 103 |
|
104 | | -// CHECK: cir.func @_Z17test_builtin_clzgj |
105 | | -// CHECK: %{{.+}} = cir.bit.clz(%{{.+}} : !u32i) : !s32i |
106 | | -// CHECK: } |
| 104 | +// CIR: cir.func @_Z17test_builtin_clzgj |
| 105 | +// CIR: %{{.+}} = cir.bit.clz(%{{.+}} : !u32i) : !s32i |
| 106 | +// CIR: } |
107 | 107 |
|
108 | 108 | int test_builtin_ffs(int x) { |
109 | 109 | return __builtin_ffs(x); |
110 | 110 | } |
111 | 111 |
|
112 | | -// CHECK: cir.func @_Z16test_builtin_ffsi |
113 | | -// CHECK: %{{.+}} = cir.bit.ffs(%{{.+}} : !s32i) : !s32i |
114 | | -// CHECK: } |
| 112 | +// CIR: cir.func @_Z16test_builtin_ffsi |
| 113 | +// CIR: %{{.+}} = cir.bit.ffs(%{{.+}} : !s32i) : !s32i |
| 114 | +// CIR: } |
115 | 115 |
|
116 | 116 | int test_builtin_ffsl(long x) { |
117 | 117 | return __builtin_ffsl(x); |
118 | 118 | } |
119 | 119 |
|
120 | | -// CHECK: cir.func @_Z17test_builtin_ffsll |
121 | | -// CHECK: %{{.+}} = cir.bit.ffs(%{{.+}} : !s64i) : !s32i |
122 | | -// CHECK: } |
| 120 | +// CIR: cir.func @_Z17test_builtin_ffsll |
| 121 | +// CIR: %{{.+}} = cir.bit.ffs(%{{.+}} : !s64i) : !s32i |
| 122 | +// CIR: } |
123 | 123 |
|
124 | 124 | int test_builtin_ffsll(long long x) { |
125 | 125 | return __builtin_ffsll(x); |
126 | 126 | } |
127 | 127 |
|
128 | | -// CHECK: cir.func @_Z18test_builtin_ffsllx |
129 | | -// CHECK: %{{.+}} = cir.bit.ffs(%{{.+}} : !s64i) : !s32i |
130 | | -// CHECK: } |
| 128 | +// CIR: cir.func @_Z18test_builtin_ffsllx |
| 129 | +// CIR: %{{.+}} = cir.bit.ffs(%{{.+}} : !s64i) : !s32i |
| 130 | +// CIR: } |
131 | 131 |
|
132 | 132 | int test_builtin_parity(unsigned x) { |
133 | 133 | return __builtin_parity(x); |
134 | 134 | } |
135 | 135 |
|
136 | | -// CHECK: cir.func @_Z19test_builtin_parityj |
137 | | -// CHECK: %{{.+}} = cir.bit.parity(%{{.+}} : !u32i) : !s32i |
138 | | -// CHECK: } |
| 136 | +// CIR: cir.func @_Z19test_builtin_parityj |
| 137 | +// CIR: %{{.+}} = cir.bit.parity(%{{.+}} : !u32i) : !s32i |
| 138 | +// CIR: } |
139 | 139 |
|
140 | 140 | int test_builtin_parityl(unsigned long x) { |
141 | 141 | return __builtin_parityl(x); |
142 | 142 | } |
143 | 143 |
|
144 | | -// CHECK: cir.func @_Z20test_builtin_paritylm |
145 | | -// CHECK: %{{.+}} = cir.bit.parity(%{{.+}} : !u64i) : !s32i |
146 | | -// CHECK: } |
| 144 | +// CIR: cir.func @_Z20test_builtin_paritylm |
| 145 | +// CIR: %{{.+}} = cir.bit.parity(%{{.+}} : !u64i) : !s32i |
| 146 | +// CIR: } |
147 | 147 |
|
148 | 148 | int test_builtin_parityll(unsigned long long x) { |
149 | 149 | return __builtin_parityll(x); |
150 | 150 | } |
151 | 151 |
|
152 | | -// CHECK: cir.func @_Z21test_builtin_paritylly |
153 | | -// CHECK: %{{.+}} = cir.bit.parity(%{{.+}} : !u64i) : !s32i |
154 | | -// CHECK: } |
| 152 | +// CIR: cir.func @_Z21test_builtin_paritylly |
| 153 | +// CIR: %{{.+}} = cir.bit.parity(%{{.+}} : !u64i) : !s32i |
| 154 | +// CIR: } |
155 | 155 |
|
156 | 156 | int test_builtin_popcount(unsigned x) { |
157 | 157 | return __builtin_popcount(x); |
158 | 158 | } |
159 | 159 |
|
160 | | -// CHECK: cir.func @_Z21test_builtin_popcountj |
161 | | -// CHECK: %{{.+}} = cir.bit.popcount(%{{.+}} : !u32i) : !s32i |
162 | | -// CHECK: } |
| 160 | +// CIR: cir.func @_Z21test_builtin_popcountj |
| 161 | +// CIR: %{{.+}} = cir.bit.popcount(%{{.+}} : !u32i) : !s32i |
| 162 | +// CIR: } |
163 | 163 |
|
164 | 164 | int test_builtin_popcountl(unsigned long x) { |
165 | 165 | return __builtin_popcountl(x); |
166 | 166 | } |
167 | 167 |
|
168 | | -// CHECK: cir.func @_Z22test_builtin_popcountlm |
169 | | -// CHECK: %{{.+}} = cir.bit.popcount(%{{.+}} : !u64i) : !s32i |
170 | | -// CHECK: } |
| 168 | +// CIR: cir.func @_Z22test_builtin_popcountlm |
| 169 | +// CIR: %{{.+}} = cir.bit.popcount(%{{.+}} : !u64i) : !s32i |
| 170 | +// CIR: } |
171 | 171 |
|
172 | 172 | int test_builtin_popcountll(unsigned long long x) { |
173 | 173 | return __builtin_popcountll(x); |
174 | 174 | } |
175 | 175 |
|
176 | | -// CHECK: cir.func @_Z23test_builtin_popcountlly |
177 | | -// CHECK: %{{.+}} = cir.bit.popcount(%{{.+}} : !u64i) : !s32i |
178 | | -// CHECK: } |
| 176 | +// CIR: cir.func @_Z23test_builtin_popcountlly |
| 177 | +// CIR: %{{.+}} = cir.bit.popcount(%{{.+}} : !u64i) : !s32i |
| 178 | +// CIR: } |
179 | 179 |
|
180 | 180 | int test_builtin_popcountg(unsigned x) { |
181 | 181 | return __builtin_popcountg(x); |
182 | 182 | } |
183 | 183 |
|
184 | | -// CHECK: cir.func @_Z22test_builtin_popcountgj |
185 | | -// CHECK: %{{.+}} = cir.bit.popcount(%{{.+}} : !u32i) : !s32i |
186 | | -// CHECK: } |
| 184 | +// CIR: cir.func @_Z22test_builtin_popcountgj |
| 185 | +// CIR: %{{.+}} = cir.bit.popcount(%{{.+}} : !u32i) : !s32i |
| 186 | +// CIR: } |
0 commit comments