2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr66560-1.c
blobb535ca7d7b388d31003b737ec699ca7606a06388
1 /* PR target/66560 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -msse4" } */
5 typedef float v4sf __attribute__((vector_size(16)));
6 typedef int v4si __attribute__((vector_size(16)));
7 v4sf foo1 (v4sf x, v4sf y)
9 v4sf tem0 = x - y;
10 v4sf tem1 = x + y;
11 return __builtin_shuffle (tem0, tem1, (v4si) { 0, 5, 2, 7 });
14 v4sf foo2 (v4sf x, v4sf y)
16 v4sf tem0 = x - y;
17 v4sf tem1 = y + x;
18 return __builtin_shuffle (tem0, tem1, (v4si) { 0, 5, 2, 7 });
21 v4sf foo3 (v4sf x, v4sf y)
23 v4sf tem0 = x + y;
24 v4sf tem1 = x - y;
25 return __builtin_shuffle (tem0, tem1, (v4si) { 4, 1, 6, 3 });
28 v4sf foo4 (v4sf x, v4sf y)
30 v4sf tem0 = y + x;
31 v4sf tem1 = x - y;
32 return __builtin_shuffle (tem0, tem1, (v4si) { 4, 1, 6, 3 });
35 /* { dg-final { scan-assembler-times "addsubps" 4 } } */