PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-15.c
bloba2e11d2d8035771871acdf6fd1067b00e22148ff
1 /* Straight-line strength reduction control flow variation. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fdump-tree-optimized" } */
6 int
7 f (int n, int c, int s)
9 int a, x1, x2, x3;
11 x1 = x2 = x3 = c;
13 if (n > 64)
15 a = 2 * s;
16 x1 = c + a;
17 a = 4 * s;
18 x2 = c + a;
19 a = 6 * s;
20 x3 = c + a;
23 return x1 + x2 + x3;
26 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */