1 /* Verify straight-line strength reduction for simple add candidates.  */
2 
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fdump-tree-optimized" } */
5 
6 int
f(int s,int c)7 f (int s, int c)
8 {
9   int a1, a2, a3, x1, x2, x3, x;
10 
11   a1 = 2 * s;
12   x1 = c + a1;
13   a2 = 4 * s;
14   x2 = c + a2;
15   a3 = 6 * s;
16   x3 = c + a3;
17   x = x1 + x2 + x3;
18   return x;
19 }
20 
21 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
22