aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-54.c
blob: 9dfc15b642f42e72551110dab5eaffa0ccdbd116 (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
/* { dg-do compile } */ 
/* { dg-options "-O1 -fscalar-evolutions -fdump-tree-scev-details" } */

int main(void)
{
  int a = 5;
  int b = 6;
  int c = 20;
  
  while (a <= 100)
    {
      int i;
      
      a = b;
      for (i = 0; i <= 12; i++)
	{
	  a++;
	}
      b = b + c;
    }
}

/* This example has been distilled from Pattern1 that cannot be
   handled: "Big steps, small steps" from the ICS'01 paper "Monotonic
   Evolution" by Peng Wu.
   
   The analyzer has to detect the following evolution functions:
   i  ->  {0, +, 1}_2
   b  ->  {6, +, 20}_1
   a  ->  {{6, +, 20}_1, +, 1}_2
*/

/* FIXME. */