OSDN Git Service

Modify the testsuite for the new Graphite.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / graphite / block-1.c
1 #define MAX 8192
2
3 void bar (void);
4
5 int main()
6 {
7   int i, j;
8   int sum = 0;
9   int A[MAX * MAX];
10   int B[MAX * MAX];
11
12   bar ();
13
14   for (i = 0; i < MAX; i++)
15     for (j = 0; j < MAX; j++)
16       {
17         A[i*MAX + j] = j;
18         B[i*MAX + j] = j;
19       }
20
21   for (i = 0; i < MAX; i++)
22     for (j = 0; j < MAX; j++)
23       A[i*MAX + j] += B[j*MAX + i];
24
25   bar ();
26
27   /* FIXME: For now, reductions are not handled by the code generation
28      of graphite.  We have to bound the scop to the above loops.  */
29
30   for(i = 0; i < MAX; i++)
31     for(j = 0; j < MAX; j++)
32       sum += A[i*MAX + j];
33
34   return sum;
35 }
36
37 /* { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite" { xfail *-*-* } } } */ 
38 /* { dg-final { cleanup-tree-dump "graphite" } } */