1 /* { dg-do compile } */
2 /* { dg-options "-O3 -mavx512f" } */
3 /* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 0 } } */
4 /* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vpbroadcastb\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
10 /* { dg-final { scan-assembler-times "vpbroadcastb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
11 /* { dg-final { scan-assembler-times "vpbroadcastw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
12 /* { dg-final { scan-assembler-times "vpbroadcastw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
13 /* { dg-final { scan-assembler-times "vbroadcastss\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 0 } } */
14 /* { dg-final { scan-assembler-times "vbroadcastsd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 0 } } */
16 #include <x86intrin.h>
18 typedef char __v64qi
__attribute__ ((vector_size (64)));
19 typedef short __v32hi
__attribute__ ((vector_size (64)));
21 __v64qi
foo_1 (char c
)
24 c
, c
, c
, c
, c
, c
, c
, c
,
25 c
, c
, c
, c
, c
, c
, c
, c
,
26 c
, c
, c
, c
, c
, c
, c
, c
,
27 c
, c
, c
, c
, c
, c
, c
, c
,
28 c
, c
, c
, c
, c
, c
, c
, c
,
29 c
, c
, c
, c
, c
, c
, c
, c
,
30 c
, c
, c
, c
, c
, c
, c
, c
,
31 c
, c
, c
, c
, c
, c
, c
, c
37 __v32hi
foo_2 (short c
)
40 c
, c
, c
, c
, c
, c
, c
, c
,
41 c
, c
, c
, c
, c
, c
, c
, c
,
42 c
, c
, c
, c
, c
, c
, c
, c
,
43 c
, c
, c
, c
, c
, c
, c
, c
52 c
, c
, c
, c
, c
, c
, c
, c
,
53 c
, c
, c
, c
, c
, c
, c
, c
59 __v8di
foo_4 (long long c
)
62 c
, c
, c
, c
, c
, c
, c
, c
68 __v32qi
foo_5 (char c
)
71 c
, c
, c
, c
, c
, c
, c
, c
,
72 c
, c
, c
, c
, c
, c
, c
, c
,
73 c
, c
, c
, c
, c
, c
, c
, c
,
74 c
, c
, c
, c
, c
, c
, c
, c
80 __v16hi
foo_6 (short c
)
83 c
, c
, c
, c
, c
, c
, c
, c
,
84 c
, c
, c
, c
, c
, c
, c
, c
93 c
, c
, c
, c
, c
, c
, c
, c
99 __v4di
foo_8 (long long c
)
109 __v16qi
foo_9 (char c
)
112 c
, c
, c
, c
, c
, c
, c
, c
,
113 c
, c
, c
, c
, c
, c
, c
, c
119 __v8hi
foo_10(short c
)
122 c
, c
, c
, c
, c
, c
, c
, c