blob: 9b681273c15d2702f8cb7b669e594ae18e25741a (
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
|
/* { dg-do compile } */
/* { dg-options "-O1 -fscalar-evolutions -fdump-tree-scev-stats" } */
int main(void)
{
int a;
int b;
int *c;
/* loop_1 runs exactly 5 times. */
for (a = 11; a < 50; a++)
{
/* loop_2 runs exactly 7 times. */
for (b = 8; b < 50; b+=5)
{
c[a++] = 5;
c[b++] = 6;
}
}
}
/* The analyzer has to detect the following evolution functions:
b -> {8, +, 6}_2
a -> {{11, +, 8}_1, +, 1}_2
*/
/* { dg-final { scan-tree-dump-times "nb_iterations 5" 1 "scev"} } */
/* { dg-final { scan-tree-dump-times "nb_iterations 7" 1 "scev"} } */
|