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