Skip to content

Commit c44846f

Browse files
committed
[CodeGen][X86] Cleanup + fix unused check-prefixes in bmi tests
1 parent fe3d765 commit c44846f

File tree

1 file changed

+87
-87
lines changed

1 file changed

+87
-87
lines changed

clang/test/CodeGen/X86/bmi-builtins.c

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +bmi -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,CHECK_TZCNT
2-
// RUN: %clang_cc1 -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 -ffreestanding %s -triple=x86_64-windows-msvc -emit-llvm -o - -Wall -Werror -DTEST_TZCNT | FileCheck %s --check-prefix=CHECK-TZCNT
1+
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +bmi -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=CHECK,TZCNT
2+
// RUN: %clang_cc1 -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 -ffreestanding %s -triple=x86_64-windows-msvc -emit-llvm -o - -Wall -Werror -DTEST_TZCNT | FileCheck %s --check-prefix=TZCNT
33

44

55
#include <immintrin.h>
@@ -15,218 +15,218 @@
1515
// intrinsics are different!
1616

1717
unsigned short test_tzcnt_u16(unsigned short __X) {
18-
// CHECK-TZCNT-LABEL: test_tzcnt_u16
19-
// CHECK-TZCNT: i16 @llvm.cttz.i16(i16 %{{.*}}, i1 false)
18+
// TZCNT-LABEL: test_tzcnt_u16
19+
// TZCNT: i16 @llvm.cttz.i16(i16 %{{.*}}, i1 false)
2020
return _tzcnt_u16(__X);
2121
}
2222

2323
unsigned short test__tzcnt_u16(unsigned short __X) {
24-
// CHECK-TZCNT-LABEL: test__tzcnt_u16
25-
// CHECK-TZCNT: i16 @llvm.cttz.i16(i16 %{{.*}}, i1 false)
24+
// TZCNT-LABEL: test__tzcnt_u16
25+
// TZCNT: i16 @llvm.cttz.i16(i16 %{{.*}}, i1 false)
2626
return __tzcnt_u16(__X);
2727
}
2828

2929
unsigned int test__tzcnt_u32(unsigned int __X) {
30-
// CHECK-TZCNT-LABEL: test__tzcnt_u32
31-
// CHECK-TZCNT: i32 @llvm.cttz.i32(i32 %{{.*}}, i1 false)
30+
// TZCNT-LABEL: test__tzcnt_u32
31+
// TZCNT: i32 @llvm.cttz.i32(i32 %{{.*}}, i1 false)
3232
return __tzcnt_u32(__X);
3333
}
3434

3535
int test_mm_tzcnt_32(unsigned int __X) {
36-
// CHECK-TZCNT-LABEL: test_mm_tzcnt_32
37-
// CHECK-TZCNT: i32 @llvm.cttz.i32(i32 %{{.*}}, i1 false)
36+
// TZCNT-LABEL: test_mm_tzcnt_32
37+
// TZCNT: i32 @llvm.cttz.i32(i32 %{{.*}}, i1 false)
3838
return _mm_tzcnt_32(__X);
3939
}
4040

4141
unsigned int test_tzcnt_u32(unsigned int __X) {
42-
// CHECK-TZCNT-LABEL: test_tzcnt_u32
43-
// CHECK-TZCNT: i32 @llvm.cttz.i32(i32 %{{.*}}, i1 false)
42+
// TZCNT-LABEL: test_tzcnt_u32
43+
// TZCNT: i32 @llvm.cttz.i32(i32 %{{.*}}, i1 false)
4444
return _tzcnt_u32(__X);
4545
}
4646

4747
#ifdef __x86_64__
4848
unsigned long long test__tzcnt_u64(unsigned long long __X) {
49-
// CHECK-TZCNT-LABEL: test__tzcnt_u64
50-
// CHECK-TZCNT: i64 @llvm.cttz.i64(i64 %{{.*}}, i1 false)
49+
// TZCNT-LABEL: test__tzcnt_u64
50+
// TZCNT: i64 @llvm.cttz.i64(i64 %{{.*}}, i1 false)
5151
return __tzcnt_u64(__X);
5252
}
5353

5454
long long test_mm_tzcnt_64(unsigned long long __X) {
55-
// CHECK-TZCNT-LABEL: test_mm_tzcnt_64
56-
// CHECK-TZCNT: i64 @llvm.cttz.i64(i64 %{{.*}}, i1 false)
55+
// TZCNT-LABEL: test_mm_tzcnt_64
56+
// TZCNT: i64 @llvm.cttz.i64(i64 %{{.*}}, i1 false)
5757
return _mm_tzcnt_64(__X);
5858
}
5959

6060
unsigned long long test_tzcnt_u64(unsigned long long __X) {
61-
// CHECK-TZCNT-LABEL: test_tzcnt_u64
62-
// CHECK-TZCNT: i64 @llvm.cttz.i64(i64 %{{.*}}, i1 false)
61+
// TZCNT-LABEL: test_tzcnt_u64
62+
// TZCNT: i64 @llvm.cttz.i64(i64 %{{.*}}, i1 false)
6363
return _tzcnt_u64(__X);
6464
}
6565
#endif
6666

6767
#if !defined(TEST_TZCNT)
6868
unsigned int test__andn_u32(unsigned int __X, unsigned int __Y) {
69-
// CHECK-LABEL: test__andn_u32
70-
// CHECK: xor i32 %{{.*}}, -1
71-
// CHECK: and i32 %{{.*}}, %{{.*}}
69+
// CHECK-LABEL: test__andn_u32
70+
// CHECK: xor i32 %{{.*}}, -1
71+
// CHECK: and i32 %{{.*}}, %{{.*}}
7272
return __andn_u32(__X, __Y);
7373
}
7474

7575
unsigned int test__bextr_u32(unsigned int __X, unsigned int __Y) {
76-
// CHECK-LABEL: test__bextr_u32
77-
// CHECK: i32 @llvm.x86.bmi.bextr.32(i32 %{{.*}}, i32 %{{.*}})
76+
// CHECK-LABEL: test__bextr_u32
77+
// CHECK: i32 @llvm.x86.bmi.bextr.32(i32 %{{.*}}, i32 %{{.*}})
7878
return __bextr_u32(__X, __Y);
7979
}
8080

8181
unsigned int test__blsi_u32(unsigned int __X) {
82-
// CHECK-LABEL: test__blsi_u32
83-
// CHECK: sub i32 0, %{{.*}}
84-
// CHECK: and i32 %{{.*}}, %{{.*}}
82+
// CHECK-LABEL: test__blsi_u32
83+
// CHECK: sub i32 0, %{{.*}}
84+
// CHECK: and i32 %{{.*}}, %{{.*}}
8585
return __blsi_u32(__X);
8686
}
8787

8888
unsigned int test__blsmsk_u32(unsigned int __X) {
89-
// CHECK-LABEL: test__blsmsk_u32
90-
// CHECK: sub i32 %{{.*}}, 1
91-
// CHECK: xor i32 %{{.*}}, %{{.*}}
89+
// CHECK-LABEL: test__blsmsk_u32
90+
// CHECK: sub i32 %{{.*}}, 1
91+
// CHECK: xor i32 %{{.*}}, %{{.*}}
9292
return __blsmsk_u32(__X);
9393
}
9494

9595
unsigned int test__blsr_u32(unsigned int __X) {
96-
// CHECK-LABEL: test__blsr_u32
97-
// CHECK: sub i32 %{{.*}}, 1
98-
// CHECK: and i32 %{{.*}}, %{{.*}}
96+
// CHECK-LABEL: test__blsr_u32
97+
// CHECK: sub i32 %{{.*}}, 1
98+
// CHECK: and i32 %{{.*}}, %{{.*}}
9999
return __blsr_u32(__X);
100100
}
101101

102102
#ifdef __x86_64__
103103
unsigned long long test__andn_u64(unsigned long __X, unsigned long __Y) {
104-
// CHECK-LABEL: test__andn_u64
105-
// CHECK: xor i64 %{{.*}}, -1
106-
// CHECK: and i64 %{{.*}}, %{{.*}}
104+
// CHECK-LABEL: test__andn_u64
105+
// CHECK: xor i64 %{{.*}}, -1
106+
// CHECK: and i64 %{{.*}}, %{{.*}}
107107
return __andn_u64(__X, __Y);
108108
}
109109

110110
unsigned long long test__bextr_u64(unsigned long __X, unsigned long __Y) {
111-
// CHECK-LABEL: test__bextr_u64
112-
// CHECK: i64 @llvm.x86.bmi.bextr.64(i64 %{{.*}}, i64 %{{.*}})
111+
// CHECK-LABEL: test__bextr_u64
112+
// CHECK: i64 @llvm.x86.bmi.bextr.64(i64 %{{.*}}, i64 %{{.*}})
113113
return __bextr_u64(__X, __Y);
114114
}
115115

116116
unsigned long long test__blsi_u64(unsigned long long __X) {
117-
// CHECK-LABEL: test__blsi_u64
118-
// CHECK: sub i64 0, %{{.*}}
119-
// CHECK: and i64 %{{.*}}, %{{.*}}
117+
// CHECK-LABEL: test__blsi_u64
118+
// CHECK: sub i64 0, %{{.*}}
119+
// CHECK: and i64 %{{.*}}, %{{.*}}
120120
return __blsi_u64(__X);
121121
}
122122

123123
unsigned long long test__blsmsk_u64(unsigned long long __X) {
124-
// CHECK-LABEL: test__blsmsk_u64
125-
// CHECK: sub i64 %{{.*}}, 1
126-
// CHECK: xor i64 %{{.*}}, %{{.*}}
124+
// CHECK-LABEL: test__blsmsk_u64
125+
// CHECK: sub i64 %{{.*}}, 1
126+
// CHECK: xor i64 %{{.*}}, %{{.*}}
127127
return __blsmsk_u64(__X);
128128
}
129129

130130
unsigned long long test__blsr_u64(unsigned long long __X) {
131-
// CHECK-LABEL: test__blsr_u64
132-
// CHECK: sub i64 %{{.*}}, 1
133-
// CHECK: and i64 %{{.*}}, %{{.*}}
131+
// CHECK-LABEL: test__blsr_u64
132+
// CHECK: sub i64 %{{.*}}, 1
133+
// CHECK: and i64 %{{.*}}, %{{.*}}
134134
return __blsr_u64(__X);
135135
}
136136
#endif
137137

138138
// Intel intrinsics
139139

140140
unsigned int test_andn_u32(unsigned int __X, unsigned int __Y) {
141-
// CHECK-LABEL: test_andn_u32
142-
// CHECK: xor i32 %{{.*}}, -1
143-
// CHECK: and i32 %{{.*}}, %{{.*}}
141+
// CHECK-LABEL: test_andn_u32
142+
// CHECK: xor i32 %{{.*}}, -1
143+
// CHECK: and i32 %{{.*}}, %{{.*}}
144144
return _andn_u32(__X, __Y);
145145
}
146146

147147
unsigned int test_bextr_u32(unsigned int __X, unsigned int __Y,
148148
unsigned int __Z) {
149-
// CHECK-LABEL: test_bextr_u32
150-
// CHECK: and i32 %{{.*}}, 255
151-
// CHECK: and i32 %{{.*}}, 255
152-
// CHECK: shl i32 %{{.*}}, 8
153-
// CHECK: or i32 %{{.*}}, %{{.*}}
154-
// CHECK: i32 @llvm.x86.bmi.bextr.32(i32 %{{.*}}, i32 %{{.*}})
149+
// CHECK-LABEL: test_bextr_u32
150+
// CHECK: and i32 %{{.*}}, 255
151+
// CHECK: and i32 %{{.*}}, 255
152+
// CHECK: shl i32 %{{.*}}, 8
153+
// CHECK: or i32 %{{.*}}, %{{.*}}
154+
// CHECK: i32 @llvm.x86.bmi.bextr.32(i32 %{{.*}}, i32 %{{.*}})
155155
return _bextr_u32(__X, __Y, __Z);
156156
}
157157

158158
unsigned int test_bextr2_u32(unsigned int __X, unsigned int __Y) {
159-
// CHECK-LABEL: test_bextr2_u32
160-
// CHECK: i32 @llvm.x86.bmi.bextr.32(i32 %{{.*}}, i32 %{{.*}})
159+
// CHECK-LABEL: test_bextr2_u32
160+
// CHECK: i32 @llvm.x86.bmi.bextr.32(i32 %{{.*}}, i32 %{{.*}})
161161
return _bextr2_u32(__X, __Y);
162162
}
163163

164164
unsigned int test_blsi_u32(unsigned int __X) {
165-
// CHECK-LABEL: test_blsi_u32
166-
// CHECK: sub i32 0, %{{.*}}
167-
// CHECK: and i32 %{{.*}}, %{{.*}}
165+
// CHECK-LABEL: test_blsi_u32
166+
// CHECK: sub i32 0, %{{.*}}
167+
// CHECK: and i32 %{{.*}}, %{{.*}}
168168
return _blsi_u32(__X);
169169
}
170170

171171
unsigned int test_blsmsk_u32(unsigned int __X) {
172-
// CHECK-LABEL: test_blsmsk_u32
173-
// CHECK: sub i32 %{{.*}}, 1
174-
// CHECK: xor i32 %{{.*}}, %{{.*}}
172+
// CHECK-LABEL: test_blsmsk_u32
173+
// CHECK: sub i32 %{{.*}}, 1
174+
// CHECK: xor i32 %{{.*}}, %{{.*}}
175175
return _blsmsk_u32(__X);
176176
}
177177

178178
unsigned int test_blsr_u32(unsigned int __X) {
179-
// CHECK-LABEL: test_blsr_u32
180-
// CHECK: sub i32 %{{.*}}, 1
181-
// CHECK: and i32 %{{.*}}, %{{.*}}
179+
// CHECK-LABEL: test_blsr_u32
180+
// CHECK: sub i32 %{{.*}}, 1
181+
// CHECK: and i32 %{{.*}}, %{{.*}}
182182
return _blsr_u32(__X);
183183
}
184184

185185
#ifdef __x86_64__
186186
unsigned long long test_andn_u64(unsigned long __X, unsigned long __Y) {
187-
// CHECK-LABEL: test_andn_u64
188-
// CHECK: xor i64 %{{.*}}, -1
189-
// CHECK: and i64 %{{.*}}, %{{.*}}
187+
// CHECK-LABEL: test_andn_u64
188+
// CHECK: xor i64 %{{.*}}, -1
189+
// CHECK: and i64 %{{.*}}, %{{.*}}
190190
return _andn_u64(__X, __Y);
191191
}
192192

193193
unsigned long long test_bextr_u64(unsigned long __X, unsigned int __Y,
194194
unsigned int __Z) {
195-
// CHECK-LABEL: test_bextr_u64
196-
// CHECK: and i32 %{{.*}}, 255
197-
// CHECK: and i32 %{{.*}}, 255
198-
// CHECK: shl i32 %{{.*}}, 8
199-
// CHECK: or i32 %{{.*}}, %{{.*}}
200-
// CHECK: zext i32 %{{.*}} to i64
201-
// CHECK: i64 @llvm.x86.bmi.bextr.64(i64 %{{.*}}, i64 %{{.*}})
195+
// CHECK-LABEL: test_bextr_u64
196+
// CHECK: and i32 %{{.*}}, 255
197+
// CHECK: and i32 %{{.*}}, 255
198+
// CHECK: shl i32 %{{.*}}, 8
199+
// CHECK: or i32 %{{.*}}, %{{.*}}
200+
// CHECK: zext i32 %{{.*}} to i64
201+
// CHECK: i64 @llvm.x86.bmi.bextr.64(i64 %{{.*}}, i64 %{{.*}})
202202
return _bextr_u64(__X, __Y, __Z);
203203
}
204204

205205
unsigned long long test_bextr2_u64(unsigned long long __X,
206206
unsigned long long __Y) {
207-
// CHECK-LABEL: test_bextr2_u64
208-
// CHECK: i64 @llvm.x86.bmi.bextr.64(i64 %{{.*}}, i64 %{{.*}})
207+
// CHECK-LABEL: test_bextr2_u64
208+
// CHECK: i64 @llvm.x86.bmi.bextr.64(i64 %{{.*}}, i64 %{{.*}})
209209
return _bextr2_u64(__X, __Y);
210210
}
211211

212212
unsigned long long test_blsi_u64(unsigned long long __X) {
213-
// CHECK-LABEL: test_blsi_u64
214-
// CHECK: sub i64 0, %{{.*}}
215-
// CHECK: and i64 %{{.*}}, %{{.*}}
213+
// CHECK-LABEL: test_blsi_u64
214+
// CHECK: sub i64 0, %{{.*}}
215+
// CHECK: and i64 %{{.*}}, %{{.*}}
216216
return _blsi_u64(__X);
217217
}
218218

219219
unsigned long long test_blsmsk_u64(unsigned long long __X) {
220-
// CHECK-LABEL: test_blsmsk_u64
221-
// CHECK: sub i64 %{{.*}}, 1
222-
// CHECK: xor i64 %{{.*}}, %{{.*}}
220+
// CHECK-LABEL: test_blsmsk_u64
221+
// CHECK: sub i64 %{{.*}}, 1
222+
// CHECK: xor i64 %{{.*}}, %{{.*}}
223223
return _blsmsk_u64(__X);
224224
}
225225

226226
unsigned long long test_blsr_u64(unsigned long long __X) {
227-
// CHECK-LABEL: test_blsr_u64
228-
// CHECK: sub i64 %{{.*}}, 1
229-
// CHECK: and i64 %{{.*}}, %{{.*}}
227+
// CHECK-LABEL: test_blsr_u64
228+
// CHECK: sub i64 %{{.*}}, 1
229+
// CHECK: and i64 %{{.*}}, %{{.*}}
230230
return _blsr_u64(__X);
231231
}
232232
#endif

0 commit comments

Comments
 (0)