Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr66560-1.c

raw
1 /* PR target/66560 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -msse4" } */
4
5 typedef float v4sf __attribute__((vector_size(16)));
6 typedef int v4si __attribute__((vector_size(16)));
7 v4sf foo1 (v4sf x, v4sf y)
8 {
9 v4sf tem0 = x - y;
10 v4sf tem1 = x + y;
11 return __builtin_shuffle (tem0, tem1, (v4si) { 0, 5, 2, 7 });
12 }
13
14 v4sf foo2 (v4sf x, v4sf y)
15 {
16 v4sf tem0 = x - y;
17 v4sf tem1 = y + x;
18 return __builtin_shuffle (tem0, tem1, (v4si) { 0, 5, 2, 7 });
19 }
20
21 v4sf foo3 (v4sf x, v4sf y)
22 {
23 v4sf tem0 = x + y;
24 v4sf tem1 = x - y;
25 return __builtin_shuffle (tem0, tem1, (v4si) { 4, 1, 6, 3 });
26 }
27
28 v4sf foo4 (v4sf x, v4sf y)
29 {
30 v4sf tem0 = y + x;
31 v4sf tem1 = x - y;
32 return __builtin_shuffle (tem0, tem1, (v4si) { 4, 1, 6, 3 });
33 }
34
35 /* { dg-final { scan-assembler-times "addsubps" 4 } } */