annotate gcc/testsuite/gcc.dg/tree-ssa/ldist-5.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile { target int32plus } } */
kono
parents:
diff changeset
2 /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 int loop1 (int k)
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 unsigned int i;
kono
parents:
diff changeset
7 unsigned int j;
kono
parents:
diff changeset
8 int a[100][100], b[100][100], c[100][100], d[100][100];
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 a[0][0] = k;
kono
parents:
diff changeset
11 for (i = 1; i < 100; i ++)
kono
parents:
diff changeset
12 for (j = 1; j < (100-1); j++)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 a[i][j] = k * i; /* S1 */
kono
parents:
diff changeset
15 b[i][j] = a[i][j-1] + k; /* S2 */
kono
parents:
diff changeset
16 c[i][j] = b[i][j] + a[i][j+1]; /* S3 */
kono
parents:
diff changeset
17 d[i][j] = c[i][j] + k + i; /* S4 */
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 /* Dependences:
kono
parents:
diff changeset
20 S1->S2 (flow, level 2)
kono
parents:
diff changeset
21 S1->S3 (anti, level 2)
kono
parents:
diff changeset
22 S2->S3 (flow, level 0)
kono
parents:
diff changeset
23 S3->S4 (flow, level 0)
kono
parents:
diff changeset
24 */
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 return a[100-1][100-1] + b[100-1][100-1] + c[100-1][100-1] + d[100-1][100-1];
kono
parents:
diff changeset
27 }
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 /* FIXME: This is XFAILed because of a data dependence analysis
kono
parents:
diff changeset
30 problem: the dependence test fails with a "don't know" relation. */
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 /* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 1 "ldist" { xfail *-*-* } } } */