Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-17.c
blob4b2baef77213b02f8bef9821219caa5cbc688913
1 /* Straight-line strength reduction control flow variation with incr = 1. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fdump-tree-optimized" } */
6 int
7 f (int n, int c, int s)
9 int a2, a3, a4, x1, x2, x3, x4;
11 x1 = c + s;
12 x2 = x3 = x4 = c;
14 if (n > 64)
16 a2 = 2 * s;
17 x2 = c + a2;
18 a3 = 3 * s;
19 x3 = c + a3;
21 else
23 a4 = 2 * s;
24 x4 = c + a4;
27 return x1 + x2 + x3 + x4;
30 /* { dg-final { scan-tree-dump-times " \\* " 0 "optimized" } } */