blob: 916c81548c8fbc043014edad48e0e73611979539 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* { dg-do compile } */
/* { dg-options "-O1 -fscalar-evolutions -fdump-tree-scev-details -fall-data-deps -fdump-tree-ddall" } */
int foo (int);
int main ()
{
int res;
int c[100][200];
int a;
int x;
for (a = 1; a < 50; a++)
{
c[a+1][a] = 2;
res += c[a][a];
/* This case exercises the subscript coupling detection: the dependence
detectors have to determine that there is no dependence between
c[a+1][a] and c[a][a]. */
}
return res + foo (c[12][13]);
}
/* This also exercises the case when, after a PRE, the loop phi node contains:
" # a_1 = PHI <1(0), T.1_11(1)>;
...
T.1_11 = a_1 + 1;".
In fact this creates a cycle: a -> T.1 -> a.
The PRE has screwed up the case...
...I really have to implement the mixers analyzers. */
/* { dg-final { diff-tree-dumps "ddall" } } */
|