2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ldist-5.c
blob39b526071799d485a36f87c1bcaa045e098a997a
1 /* { dg-do compile } */
2 /* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
3 /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
5 int loop1 (int k)
7 unsigned int i;
8 unsigned int j;
9 int a[100][100], b[100][100], c[100][100], d[100][100];
11 a[0][0] = k;
12 for (i = 1; i < 100; i ++)
13 for (j = 1; j < (100-1); j++)
15 a[i][j] = k * i; /* S1 */
16 b[i][j] = a[i][j-1] + k; /* S2 */
17 c[i][j] = b[i][j] + a[i][j+1]; /* S3 */
18 d[i][j] = c[i][j] + k + i; /* S4 */
20 /* Dependences:
21 S1->S2 (flow, level 2)
22 S1->S3 (anti, level 2)
23 S2->S3 (flow, level 0)
24 S3->S4 (flow, level 0)
27 return a[100-1][100-1] + b[100-1][100-1] + c[100-1][100-1] + d[100-1][100-1];
30 /* FIXME: This is XFAILed because of a data dependence analysis
31 problem: the dependence test fails with a "don't know" relation. */
33 /* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 1 "ldist" { xfail *-*-* } } } */
34 /* { dg-final { cleanup-tree-dump "ldist" } } */