2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mavx" } */
5 typedef float v4sf
__attribute__((vector_size(16)));
6 typedef int v4si
__attribute__((vector_size(16)));
7 v4sf
foo_v4sf (v4sf x
, v4sf y
)
11 return __builtin_shuffle (tem0
, tem1
, (v4si
) { 0, 5, 2, 7 });
14 typedef float v8sf
__attribute__((vector_size(32)));
15 typedef int v8si
__attribute__((vector_size(32)));
16 v8sf
foo_v8sf (v8sf x
, v8sf y
)
20 return __builtin_shuffle (tem0
, tem1
, (v8si
) { 0, 9, 2, 11, 4, 13, 6, 15 });
23 typedef double v2df
__attribute__((vector_size(16)));
24 typedef long long v2di
__attribute__((vector_size(16)));
25 v2df
foo_v2df (v2df x
, v2df y
)
29 return __builtin_shuffle (tem0
, tem1
, (v2di
) { 0, 3 });
32 typedef double v4df
__attribute__((vector_size(32)));
33 typedef long long v4di
__attribute__((vector_size(32)));
34 v4df
foo_v4df (v4df x
, v4df y
)
38 return __builtin_shuffle (tem0
, tem1
, (v4di
) { 0, 5, 2, 7 });
41 /* { dg-final { scan-assembler-times "vaddsubps" 2 } } */
42 /* { dg-final { scan-assembler-times "vaddsubpd" 2 } } */