1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -mavx512bw" } */
3
4 #include <x86intrin.h>
5
6 void
f1(__m128i x,__m128i y)7 f1 (__m128i x, __m128i y)
8 {
9 register __m128i a __asm ("xmm16"), b __asm ("xmm17");
10 a = x;
11 b = y;
12 asm volatile ("" : "+v" (a), "+v" (b));
13 a = _mm_shuffle_epi8 (a, b);
14 asm volatile ("" : "+v" (a));
15 }
16
17 /* { dg-final { scan-assembler "vpshufb\[^\n\r]*xmm1\[67]\[^\n\r]*xmm1\[67]\[^\n\r]*xmm1\[67]" } } */
18
19 void
f2(__m256i x,__m256i y)20 f2 (__m256i x, __m256i y)
21 {
22 register __m256i a __asm ("xmm16"), b __asm ("xmm17");
23 a = x;
24 b = y;
25 asm volatile ("" : "+v" (a), "+v" (b));
26 a = _mm256_shuffle_epi8 (a, b);
27 asm volatile ("" : "+v" (a));
28 }
29
30 /* { dg-final { scan-assembler "vpshufb\[^\n\r]*ymm1\[67]\[^\n\r]*ymm1\[67]\[^\n\r]*ymm1\[67]" } } */
31