Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr114322.c

raw
1 /* PR tree-optimization/114322 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target vect_int } */
4
5 int
6 foo (int *A, int *B, int x, int stride)
7 {
8 int sum = 0;
9
10 if (stride > 1)
11 {
12 for (int i = 0; i < 1024; ++i)
13 sum += A[(i + x) * stride] + B[i];
14 }
15
16 return sum;
17 }
18
19 /* { dg-final { scan-tree-dump-not "failed: evolution of base is not affine." "vect" } } */
20 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */