PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-35.c
blob9a7d8d5d253791601efd1c20f5aa91f2b6b96673
1 /* Verify straight-line strength reduction for a candidate with a basis
2 hidden by a phi dependences, having a known stride, and where the
3 phi has an argument which is a parameter. */
5 /* { dg-do compile } */
6 /* { dg-options "-O3 -fno-code-hoisting -fdump-tree-optimized" } */
8 int
9 f (int c, int i)
11 int a1, a3, x1, x3, x;
13 a1 = i * 16;
14 x1 = c + a1;
16 if (x1 > 6)
17 i = i + 2;
19 i = i + 2;
20 a3 = i * 16;
21 x3 = c + a3;
23 x = x1 + x3;
24 return x;
27 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */