Debian Codegraph @

gcc/testsuite/gcc.dg/vect/bb-slp-75.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
3 /* { dg-additional-options "-ffast-math" } */
4 /* { dg-additional-options "-msse2 -mfpmath=sse" { target { x86_64-*-* i?86-*-* } } } */
5
6 float x[4];
7
8 float test1 (float a)
9 {
10 return x[0] + x[2] + x[1] + x[3] + a;
11 }
12
13 float test2 (void)
14 {
15 return x[3] + x[2] + x[1] + 1.f + x[0];
16 }
17
18 float test3 (float a)
19 {
20 return x[0] + a + x[2] + x[1] + x[3] + 1.f;
21 }
22
23 /* We currently require a .REDUC_PLUS direct internal function but do not
24 have a dejagnu target for this. */
25 /* { dg-final { scan-tree-dump-times "Basic block will be vectorized using SLP" 3 "slp2" { target { x86_64-*-* i?86-*-* } } } } */