1 /* Straight-line strength reduction control flow variation with incr = 1.  */
2 
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fdump-tree-optimized" } */
5 
6 int
f(int n,int c,int s)7 f (int n, int c, int s)
8 {
9   int a2, a3, a4, x1, x2, x3, x4;
10 
11   x1 = c + s;
12   x2 = x3 = x4 = c;
13 
14   if (n > 64)
15     {
16       a2 = 2 * s;
17       x2 = c + a2;
18       a3 = 3 * s;
19       x3 = c + a3;
20     }
21   else
22     {
23       a4 = 2 * s;
24       x4 = c + a4;
25     }
26 
27   return x1 + x2 + x3 + x4;
28 }
29 
30 /* { dg-final { scan-tree-dump-times " \\* " 0 "optimized" } } */
31