openmp: Add testcases for omp_max_vf
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-outer-slp-1.c
blob2c128fa39070740d46066669f8f64716e185b440
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 int a[1024];
6 void foo (void)
8 for (int i = 0; i < 1020; i += 4)
10 int suma = a[i];
11 int sumb = a[i+1];
12 int sumc = a[i+2];
13 int sumd = a[i+3];
14 for (unsigned j = 0; j < 77; ++j)
16 suma = (suma ^ i) + 1;
17 sumb = (sumb ^ i) + 2;
18 sumc = (sumc ^ i) + 3;
19 sumd = (sumd ^ i) + 4;
21 a[i] = suma;
22 a[i+1] = sumb;
23 a[i+2] = sumc;
24 a[i+3] = sumd;
28 /* We should vectorize this outer loop with SLP. */
29 /* { dg-final { scan-tree-dump "OUTER LOOP VECTORIZED" "vect" } } */
30 /* We don't yet support SLP inductions for variable length vectors. */
31 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { xfail vect_variable_length } } } */
32 /* { dg-final { scan-tree-dump-not " = VEC_PERM_EXPR" "vect" } } */