OSDN Git Service

3d237b78e72da778521909dafa9ce9a7337d7af5
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-outer-1a.c
1 /* { dg-do compile } */
2
3 #define N 64
4 signed short image[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
5 signed short block[N][N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
6
7 /* Can't do outer-loop vectorization because of non-consecutive access.
8    Currently fails to vectorize because the reduction pattern is not
9    recognized.  */
10
11 int
12 foo (){
13   int i,j;
14   int diff = 0;
15
16   for (i = 0; i < N; i++) {
17     for (j = 0; j < N; j+=8) {
18       diff += (image[i][j] - block[i][j]);
19     }
20   }
21   return diff;
22 }
23
24 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
25 /* FORNOW */
26 /* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail *-*-* } } } */
27 /* { dg-final { scan-tree-dump-times "unexpected pattern" 1 "vect" } } */
28 /* { dg-final { cleanup-tree-dump "vect" } } */