PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr66560-3.c
blob22f19d5ff130ffde80d92c151886fdb583f564e8
1 /* PR target/66560 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mavx" } */
5 typedef float v8sf __attribute__((vector_size(32)));
6 typedef int v8si __attribute__((vector_size(32)));
7 v8sf foo1 (v8sf x, v8sf y)
9 v8sf tem0 = x - y;
10 v8sf tem1 = x + y;
11 return __builtin_shuffle (tem0, tem1, (v8si) { 0, 9, 2, 11, 4, 13, 6, 15 });
14 v8sf foo2 (v8sf x, v8sf y)
16 v8sf tem0 = x - y;
17 v8sf tem1 = y + x;
18 return __builtin_shuffle (tem0, tem1, (v8si) { 0, 9, 2, 11, 4, 13, 6, 15 });
21 v8sf foo3 (v8sf x, v8sf y)
23 v8sf tem0 = x + y;
24 v8sf tem1 = x - y;
25 return __builtin_shuffle (tem0, tem1, (v8si) { 8, 1, 10, 3, 12, 5, 14, 7 });
28 v8sf foo4 (v8sf x, v8sf y)
30 v8sf tem0 = y + x;
31 v8sf tem1 = x - y;
32 return __builtin_shuffle (tem0, tem1, (v8si) { 8, 1, 10, 3, 12, 5, 14, 7 });
35 /* { dg-final { scan-assembler-times "vaddsubps" 4 } } */