Skip to content

Commit 3e26e39

Browse files
committed
Put the TEST_CONSTEXPR tests after their corresponding CHECK tests
1 parent 9f3a5a9 commit 3e26e39

File tree

2 files changed

+95
-95
lines changed

2 files changed

+95
-95
lines changed

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

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,70 @@ __m512i test_mm512_mask_permutexvar_epi8(__m512i __W, __mmask64 __M, __m512i __A
207207
return _mm512_mask_permutexvar_epi8(__W, __M, __A, __B);
208208
}
209209

210+
__m512i test_mm512_multishift_epi64_epi8(__m512i __X, __m512i __Y) {
211+
// CHECK-LABEL: test_mm512_multishift_epi64_epi8
212+
// CHECK: call <64 x i8> @llvm.x86.avx512.pmultishift.qb.512(<64 x i8> %{{.*}}, <64 x i8> %{{.*}})
213+
return _mm512_multishift_epi64_epi8(__X, __Y);
214+
}
215+
216+
TEST_CONSTEXPR(match_v64qu(
217+
_mm512_multishift_epi64_epi8(
218+
(__m512i)(__v64qu){
219+
0, 8, 16, 24, 32, 40, 48, 56,
220+
0, 8, 16, 24, 32, 40, 48, 56,
221+
0, 8, 16, 24, 32, 40, 48, 56,
222+
0, 8, 16, 24, 32, 40, 48, 56,
223+
0, 8, 16, 24, 32, 40, 48, 56,
224+
0, 8, 16, 24, 32, 40, 48, 56,
225+
0, 8, 16, 24, 32, 40, 48, 56,
226+
0, 8, 16, 24, 32, 40, 48, 56},
227+
(__m512i)(__v64qu){
228+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
229+
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
230+
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
231+
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
232+
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
233+
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
234+
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
235+
0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78}),
236+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
237+
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
238+
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
239+
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
240+
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
241+
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
242+
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
243+
0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78));
244+
245+
TEST_CONSTEXPR(match_v64qu(
246+
_mm512_multishift_epi64_epi8(
247+
(__m512i)(__v64qu){
248+
4, 4, 4, 4, 4, 4, 4, 4,
249+
4, 4, 4, 4, 4, 4, 4, 4,
250+
4, 4, 4, 4, 4, 4, 4, 4,
251+
4, 4, 4, 4, 4, 4, 4, 4,
252+
4, 4, 4, 4, 4, 4, 4, 4,
253+
4, 4, 4, 4, 4, 4, 4, 4,
254+
4, 4, 4, 4, 4, 4, 4, 4,
255+
4, 4, 4, 4, 4, 4, 4, 4},
256+
(__m512i)(__v64qu){
257+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
258+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
259+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
260+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
261+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
262+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
263+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
264+
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE}),
265+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
266+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
267+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
268+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
269+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
270+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
271+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
272+
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21));
273+
210274
__m512i test_mm512_mask_multishift_epi64_epi8(__m512i __W, __mmask64 __M, __m512i __X, __m512i __Y) {
211275
// CHECK-LABEL: test_mm512_mask_multishift_epi64_epi8
212276
// CHECK: call <64 x i8> @llvm.x86.avx512.pmultishift.qb.512(<64 x i8> %{{.*}}, <64 x i8> %{{.*}})
@@ -289,67 +353,3 @@ TEST_CONSTEXPR(match_v64qu(
289353
0x51, 0, 0x53, 0, 0x55, 0, 0x57, 0,
290354
0x61, 0, 0x63, 0, 0x65, 0, 0x67, 0,
291355
0x71, 0, 0x73, 0, 0x75, 0, 0x77, 0));
292-
293-
__m512i test_mm512_multishift_epi64_epi8(__m512i __X, __m512i __Y) {
294-
// CHECK-LABEL: test_mm512_multishift_epi64_epi8
295-
// CHECK: call <64 x i8> @llvm.x86.avx512.pmultishift.qb.512(<64 x i8> %{{.*}}, <64 x i8> %{{.*}})
296-
return _mm512_multishift_epi64_epi8(__X, __Y);
297-
}
298-
299-
TEST_CONSTEXPR(match_v64qu(
300-
_mm512_multishift_epi64_epi8(
301-
(__m512i)(__v64qu){
302-
0, 8, 16, 24, 32, 40, 48, 56,
303-
0, 8, 16, 24, 32, 40, 48, 56,
304-
0, 8, 16, 24, 32, 40, 48, 56,
305-
0, 8, 16, 24, 32, 40, 48, 56,
306-
0, 8, 16, 24, 32, 40, 48, 56,
307-
0, 8, 16, 24, 32, 40, 48, 56,
308-
0, 8, 16, 24, 32, 40, 48, 56,
309-
0, 8, 16, 24, 32, 40, 48, 56},
310-
(__m512i)(__v64qu){
311-
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
312-
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
313-
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
314-
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
315-
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
316-
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
317-
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
318-
0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78}),
319-
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
320-
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
321-
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
322-
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
323-
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
324-
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
325-
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
326-
0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78));
327-
328-
TEST_CONSTEXPR(match_v64qu(
329-
_mm512_multishift_epi64_epi8(
330-
(__m512i)(__v64qu){
331-
4, 4, 4, 4, 4, 4, 4, 4,
332-
4, 4, 4, 4, 4, 4, 4, 4,
333-
4, 4, 4, 4, 4, 4, 4, 4,
334-
4, 4, 4, 4, 4, 4, 4, 4,
335-
4, 4, 4, 4, 4, 4, 4, 4,
336-
4, 4, 4, 4, 4, 4, 4, 4,
337-
4, 4, 4, 4, 4, 4, 4, 4,
338-
4, 4, 4, 4, 4, 4, 4, 4},
339-
(__m512i)(__v64qu){
340-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
341-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
342-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
343-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
344-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
345-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
346-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
347-
0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE}),
348-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
349-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
350-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
351-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
352-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
353-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
354-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
355-
0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21));

clang/test/CodeGen/X86/avx512vbmivl-builtin.c

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,21 @@ TEST_CONSTEXPR(match_v32qu(
162162
216, 109, 218, 110, 220, 111, 222, 112,
163163
224, 113, 226, 114, 228, 115, 230, 116));
164164

165+
__m128i test_mm_multishift_epi64_epi8(__m128i __X, __m128i __Y) {
166+
// CHECK-LABEL: test_mm_multishift_epi64_epi8
167+
// CHECK: call <16 x i8> @llvm.x86.avx512.pmultishift.qb.128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
168+
return _mm_multishift_epi64_epi8(__X, __Y);
169+
}
170+
171+
TEST_CONSTEXPR(match_v16qu(
172+
_mm_multishift_epi64_epi8(
173+
(__m128i)(__v16qu){0, 8, 16, 24, 32, 40, 48, 56,
174+
0, 8, 16, 24, 32, 40, 48, 56},
175+
(__m128i)(__v16qu){0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
176+
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}),
177+
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
178+
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18));
179+
165180
__m128i test_mm_mask_multishift_epi64_epi8(__m128i __W, __mmask16 __M, __m128i __X, __m128i __Y) {
166181
// CHECK-LABEL: test_mm_mask_multishift_epi64_epi8
167182
// CHECK: call <16 x i8> @llvm.x86.avx512.pmultishift.qb.128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
@@ -198,20 +213,26 @@ TEST_CONSTEXPR(match_v16qu(
198213
0x01, 0, 0x03, 0, 0x05, 0, 0x07, 0,
199214
0x11, 0, 0x13, 0, 0x15, 0, 0x17, 0));
200215

201-
__m128i test_mm_multishift_epi64_epi8(__m128i __X, __m128i __Y) {
202-
// CHECK-LABEL: test_mm_multishift_epi64_epi8
203-
// CHECK: call <16 x i8> @llvm.x86.avx512.pmultishift.qb.128(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
204-
return _mm_multishift_epi64_epi8(__X, __Y);
216+
__m256i test_mm256_multishift_epi64_epi8(__m256i __X, __m256i __Y) {
217+
// CHECK-LABEL: test_mm256_multishift_epi64_epi8
218+
// CHECK: call <32 x i8> @llvm.x86.avx512.pmultishift.qb.256(<32 x i8> %{{.*}}, <32 x i8> %{{.*}})
219+
return _mm256_multishift_epi64_epi8(__X, __Y);
205220
}
206221

207-
TEST_CONSTEXPR(match_v16qu(
208-
_mm_multishift_epi64_epi8(
209-
(__m128i)(__v16qu){0, 8, 16, 24, 32, 40, 48, 56,
222+
TEST_CONSTEXPR(match_v32qu(
223+
_mm256_multishift_epi64_epi8(
224+
(__m256i)(__v32qu){0, 8, 16, 24, 32, 40, 48, 56,
225+
0, 8, 16, 24, 32, 40, 48, 56,
226+
0, 8, 16, 24, 32, 40, 48, 56,
210227
0, 8, 16, 24, 32, 40, 48, 56},
211-
(__m128i)(__v16qu){0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
212-
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}),
228+
(__m256i)(__v32qu){0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
229+
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
230+
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
231+
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38}),
213232
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
214-
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18));
233+
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
234+
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
235+
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38));
215236

216237
__m256i test_mm256_mask_multishift_epi64_epi8(__m256i __W, __mmask32 __M, __m256i __X, __m256i __Y) {
217238
// CHECK-LABEL: test_mm256_mask_multishift_epi64_epi8
@@ -263,24 +284,3 @@ TEST_CONSTEXPR(match_v32qu(
263284
0x21, 0, 0x23, 0, 0x25, 0, 0x27, 0,
264285
0x31, 0, 0x33, 0, 0x35, 0, 0x37, 0));
265286

266-
__m256i test_mm256_multishift_epi64_epi8(__m256i __X, __m256i __Y) {
267-
// CHECK-LABEL: test_mm256_multishift_epi64_epi8
268-
// CHECK: call <32 x i8> @llvm.x86.avx512.pmultishift.qb.256(<32 x i8> %{{.*}}, <32 x i8> %{{.*}})
269-
return _mm256_multishift_epi64_epi8(__X, __Y);
270-
}
271-
272-
TEST_CONSTEXPR(match_v32qu(
273-
_mm256_multishift_epi64_epi8(
274-
(__m256i)(__v32qu){0, 8, 16, 24, 32, 40, 48, 56,
275-
0, 8, 16, 24, 32, 40, 48, 56,
276-
0, 8, 16, 24, 32, 40, 48, 56,
277-
0, 8, 16, 24, 32, 40, 48, 56},
278-
(__m256i)(__v32qu){0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
279-
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
280-
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
281-
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38}),
282-
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
283-
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
284-
0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
285-
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38));
286-

0 commit comments

Comments
 (0)