Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / graphite / interchange-12.c
blob16c0ddbd6c71d8afbf16aa6c79e4d31f7375aac0
1 /* { dg-require-effective-target size32plus } */
3 #define DEBUG 0
4 #if DEBUG
5 #include <stdio.h>
6 #endif
8 #define N 200
10 int A[N][N], B[N][N], C[N][N];
12 static int __attribute__((noinline))
13 matmult (void)
15 int i, j, k;
17 for (i = 0; i < N; i++)
18 for (j = 0; j < N; j++)
20 A[i][j] = 0;
21 for (k = 0; k < N; k++)
22 A[i][j] += B[i][k] * C[k][j];
25 return A[0][0] + A[N-1][N-1];
28 extern void abort ();
30 int
31 main (void)
33 int i, j, res;
35 for (i = 0; i < N; i++)
36 for (j = 0; j < N; j++)
38 A[i][j] = 0;
39 B[i][j] = i - j;
40 C[i][j] = i + j;
43 res = matmult ();
45 #if DEBUG
46 fprintf (stderr, "res = %d \n", res);
47 #endif
49 if (res != 2626800)
50 abort ();
52 return 0;
55 /* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
56 /* { dg-final { cleanup-tree-dump "graphite" } } */