OSDN Git Service

r383@cf-ppc-macosx: monabuilder | 2008-12-23 16:04:56 +0900
[pf3gnuchains/pf3gnuchains3x.git] / gcc / testsuite / gcc.dg / graphite / block-5.c
1 /* { dg-options "-O2 -floop-block -fdump-tree-graphite-all" } */
2
3 #define N 10000
4 void foo (int);
5 int test ()
6 {
7   int a[N][N];
8   int b[N][N];
9   unsigned i, j;
10
11   for (i = 0; i < N; i++) 
12     for (j = 0; j < N; j++)
13       a[i][j] = i*j;
14
15   for (j = 1; j < N; j++) 
16     for (i = 0; i < N; i++)
17       a[i][j] = a[i][j-1] + b[i][j];
18
19   for (i = 0; i < N; i++) 
20     for (j = 0; j < N; j++) 
21       foo (a[i][j]); 
22 }
23
24 /* Interchange is legal for loops 0 and 1 of the first two SCoPs */
25 /* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite"} } */
26 /* { dg-final { cleanup-tree-dump "graphite" } } */