remove -floop-* flags
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / block-3.c
blobfd0e661696a153c91f8100bb12db010a950870d1
1 /* { dg-require-effective-target size32plus } */
2 /* { dg-require-effective-target run_expensive_tests } PR testsuite/48283 */
3 /* { dg-timeout-factor 4.0 } */
5 #define DEBUG 0
6 #if DEBUG
7 #include <stdio.h>
8 #endif
10 #define N 24
11 #define M 100
13 int A[M][M][M], B[M][M], C[M][M];
15 static int __attribute__((noinline))
16 foo (void)
18 int i, j, k;
20 /* These loops contain too few iterations to be blocked. */
21 for (i = 0; i < 24; i++)
22 for (j = 0; j < 24; j++)
23 for (k = 0; k < 24; k++)
24 A[i][j][k] = B[i][k] * C[k][j];
26 /* These loops should still be loop blocked. */
27 for (i = 0; i < M; i++)
28 for (j = 0; j < M; j++)
29 for (k = 0; k < M; k++)
30 A[i][j][k] = B[i][k] * C[k][j];
32 return A[0][0][0] + A[M-1][M-1][M-1];
35 extern void abort ();
37 int
38 main (void)
40 int i, j, res;
42 for (i = 0; i < M; i++)
43 for (j = 0; j < M; j++)
45 B[i][j] = i;
46 C[i][j] = j;
49 res = foo ();
51 #if DEBUG
52 fprintf (stderr, "res = %d \n", res);
53 #endif
55 if (res != 9801)
56 abort ();
58 return 0;
61 /* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */