2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-vpbroadcast-3.c
blobff3d27580dd2c59f1c02b4ffd2d1c21ce6b381b9
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mavx512vl -mavx512bw" } */
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)));
10 void
11 f1 (V1 *x)
13 register V1 a __asm ("xmm16");
14 a = __builtin_shuffle (*x, (V1) { 0 });
15 asm volatile ("" : "+v" (a));
18 /* { dg-final { scan-assembler "vpbroadcastb\[^\n\r]*xmm16" } } */
20 void
21 f2 (V2 *x)
23 register V2 a __asm ("xmm16");
24 a = __builtin_shuffle (*x, (V2) { 0 });
25 asm volatile ("" : "+v" (a));
28 /* { dg-final { scan-assembler "vpbroadcastw\[^\n\r]*xmm16" } } */
30 void
31 f5 (V5 *x)
33 register V5 a __asm ("xmm16");
34 a = __builtin_shuffle (*x, (V5) { 0 });
35 asm volatile ("" : "+v" (a));
38 /* { dg-final { scan-assembler "vpbroadcastb\[^\n\r]*ymm16" } } */
40 void
41 f6 (V6 *x)
43 register V6 a __asm ("xmm16");
44 a = __builtin_shuffle (*x, (V6) { 0 });
45 asm volatile ("" : "+v" (a));
48 /* { dg-final { scan-assembler "vpbroadcastw\[^\n\r]*ymm16" } } */
50 void
51 f7 (V7 *x)
53 register V7 a __asm ("xmm16");
54 a = __builtin_shuffle (*x, (V7) { 0 });
55 asm volatile ("" : "+v" (a));
58 /* { dg-final { scan-assembler "vpbroadcastd\[^\n\r]*ymm16" } } */