1/* { dg-do compile } */
2
3#define N 256
4signed short image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5signed short block[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
6signed short out[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7
8/* Can't do outer-loop vectorization because of non-consecutive access.  */
9
10void
11foo (){
12  int i,j;
13  int diff;
14
15  for (i = 0; i < N; i++) {
16    diff = 0;
17    for (j = 0; j < N; j+=8) {
18      diff += (image[i][j] - block[i][j]);
19    }
20    out[i]=diff;
21  }
22}
23
24/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
25/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
26/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
27/* { dg-final { cleanup-tree-dump "vect" } } */
28