Handle more SLP constant and extern definitions for variable VF
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-39.c
blob85d32eaf748a64820a374eec88faad3ad5aac2ae
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
4 double x[1024], y[1024], z[1024];
5 void foo (double w)
7 int i;
8 for (i = 0; i < 1023; i+=2)
10 z[i] = x[i] + 1;
11 z[i+1] = x[i+1] + w;
14 void bar (double w)
16 int i;
17 for (i = 0; i < 1023; i+=2)
19 z[i] = x[i] + w;
20 z[i+1] = x[i+1] + 1;
24 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */