PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-12.c
blobf92b70ffafbbe4af53856025359d65db45e277bc
1 /* Verify that no straight-line strength reduction occurs across sibling
2 blocks. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 int
8 f (int s, int c)
10 int a1, a2, a3, x1, x2, x3, x;
12 if (c > 0)
14 a1 = 2 * s;
15 x1 = c + a1;
17 else
19 a1 = 4 * s;
20 x1 = c + a1;
23 a2 = 6 * s;
24 x2 = c + a2;
25 x = x1 + x2;
26 return x;
29 /* { dg-final { scan-tree-dump-times " \\* " 3 "optimized" } } */