Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-32.c
blobeb0d1377a671b5f261ebc2c8574e8e24501f18b5
1 /* Verify straight-line strength reduction for a candidate with a basis
2 hidden by a phi dependence and having an unknown stride. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 int
8 f (int s, int c, int i)
10 int a1, a2, a3, x1, x2, x3, x;
12 a1 = i * s;
13 x1 = c + a1;
15 i = i + 2;
16 a2 = i * s;
17 x2 = c + a2;
19 if (x2 > 6)
20 i = i + 2;
22 i = i + 2;
23 a3 = i * s;
24 x3 = c + a3;
26 x = x1 + x2 + x3;
27 return x;
30 /* { dg-final { scan-tree-dump-times " \\* s" 1 "optimized" } } */
31 /* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */