2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr66560-4.c
bloba8a6e907f959337aa29bcabc789b5e980c0896e5
1 /* PR target/66560 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mavx" } */
5 typedef double v4df __attribute__((vector_size(32)));
6 typedef long long v4di __attribute__((vector_size(32)));
7 v4df foo1 (v4df x, v4df y)
9 v4df tem0 = x - y;
10 v4df tem1 = x + y;
11 return __builtin_shuffle (tem0, tem1, (v4di) { 0, 5, 2, 7 });
14 v4df foo2 (v4df x, v4df y)
16 v4df tem0 = x - y;
17 v4df tem1 = y + x;
18 return __builtin_shuffle (tem0, tem1, (v4di) { 0, 5, 2, 7 });
21 v4df foo3 (v4df x, v4df y)
23 v4df tem0 = x + y;
24 v4df tem1 = x - y;
25 return __builtin_shuffle (tem0, tem1, (v4di) { 4, 1, 6, 3 });
28 v4df foo4 (v4df x, v4df y)
30 v4df tem0 = y + x;
31 v4df tem1 = x - y;
32 return __builtin_shuffle (tem0, tem1, (v4di) { 4, 1, 6, 3 });
35 /* { dg-final { scan-assembler-times "vaddsubpd" 4 } } */