1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -mno-avx512bw" } */
3 
4 typedef char V1 __attribute__((vector_size (16)));
5 typedef short V2 __attribute__((vector_size (16)));
6 typedef char V5 __attribute__((vector_size (32)));
7 typedef short V6 __attribute__((vector_size (32)));
8 typedef int V7 __attribute__((vector_size (32)));
9 
10 void
f1(V1 * x)11 f1 (V1 *x)
12 {
13   register V1 a __asm ("xmm16");
14   a = __builtin_shuffle (*x, (V1) { 0 });
15   asm volatile ("" : "+v" (a));
16 }
17 
18 /* { dg-final { scan-assembler-not "vpbroadcastb\[^\n\r]*xmm16" } } */
19 
20 void
f2(V2 * x)21 f2 (V2 *x)
22 {
23   register V2 a __asm ("xmm16");
24   a = __builtin_shuffle (*x, (V2) { 0 });
25   asm volatile ("" : "+v" (a));
26 }
27 
28 /* { dg-final { scan-assembler-not "vpbroadcastw\[^\n\r]*xmm16" } } */
29 
30 void
f5(V5 * x)31 f5 (V5 *x)
32 {
33   register V5 a __asm ("xmm16");
34   a = __builtin_shuffle (*x, (V5) { 0 });
35   asm volatile ("" : "+v" (a));
36 }
37 
38 /* { dg-final { scan-assembler-not "vpbroadcastb\[^\n\r]*ymm16" } } */
39 
40 void
f6(V6 * x)41 f6 (V6 *x)
42 {
43   register V6 a __asm ("xmm16");
44   a = __builtin_shuffle (*x, (V6) { 0 });
45   asm volatile ("" : "+v" (a));
46 }
47 
48 /* { dg-final { scan-assembler-not "vpbroadcastw\[^\n\r]*ymm16" } } */
49 
50 void
f7(V7 * x)51 f7 (V7 *x)
52 {
53   register V7 a __asm ("xmm16");
54   a = __builtin_shuffle (*x, (V7) { 0 });
55   asm volatile ("" : "+v" (a));
56 }
57 
58 /* { dg-final { scan-assembler "vpbroadcastd\[^\n\r]*ymm16" } } */
59