Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-34.c
blobd7ede2efe8ce4825fe9e704d89d59838a411ab90
1 /* Verify straight-line strength reduction for a candidate with a basis
2 hidden by two phi dependences, and having a known stride. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 extern void
8 g (void);
10 int
11 f (int c, int i)
13 int a1, a2, a3, x1, x2, x3, x;
15 a1 = i * 16;
16 x1 = c + a1;
18 i = i + 2;
19 a2 = i * 16;
20 x2 = c + a2;
22 if (x2 > 6)
24 if (c < 200)
25 i = i + 2;
26 else
27 i = i + 4;
28 g ();
30 else
31 i = i + 6;
33 i = i + 2;
34 a3 = i * 16;
35 x3 = c + a3;
37 x = x1 + x2 + x3;
38 return x;
41 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
42 /* { dg-final { scan-tree-dump-times "PHI" 2 "optimized" } } */