1 /* Verify straight-line strength reduction for a candidate with a basis
2    hidden by a phi dependence and having a known stride.  */
3 
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
6 
7 int
f(int c,int i)8 f (int c, int i)
9 {
10   int a1, a2, a3, x1, x2, x3, x;
11 
12   a1 = i * 16;
13   x1 = c + a1;
14 
15   i = i + 2;
16   a2 = i * 16;
17   x2 = c + a2;
18 
19   if (x2 > 6)
20     i = i + 2;
21 
22   i = i + 2;
23   a3 = i * 16;
24   x3 = c + a3;
25 
26   x = x1 + x2 + x3;
27   return x;
28 }
29 
30 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
31