Debian Codegraph @

gcc/testsuite/gcc.target/i386/vect-addsubv2df.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target sse3 } */
3 /* { dg-options "-O3 -msse3 -fdump-tree-slp2" } */
4
5 #ifndef CHECK_H
6 #define CHECK_H "sse3-check.h"
7 #endif
8
9 #ifndef TEST
10 #define TEST sse3_test
11 #endif
12
13 #include CHECK_H
14
15 double x[2], y[2], z[2];
16 void __attribute__((noipa)) foo ()
17 {
18 x[0] = y[0] - z[0];
19 x[1] = y[1] + z[1];
20 }
21 void __attribute__((noipa)) bar ()
22 {
23 x[0] = y[0] + z[0];
24 x[1] = y[1] - z[1];
25 }
26 static void
27 TEST (void)
28 {
29 for (int i = 0; i < 2; ++i)
30 {
31 y[i] = i + 1;
32 z[i] = 2 * i + 1;
33 }
34 foo ();
35 if (x[0] != 0 || x[1] != 5)
36 __builtin_abort ();
37 bar ();
38 if (x[0] != 2 || x[1] != -1)
39 __builtin_abort ();
40 }
41
42 /* { dg-final { scan-tree-dump-times "ADDSUB" 1 "slp2" } } */