Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-18.c
blob79db6a2b4c661a9cbc1fa2d5cfc7e40b0a449d51
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 a1, a2, a3, a4, x1, x2, x3, x4;
11 a1 = 4 * s;
12 x1 = c + a1;
13 x2 = x3 = x4 = c;
15 if (n > 64)
17 a2 = 3 * s;
18 x2 = c + a2;
19 a3 = 2 * s;
20 x3 = c + a3;
22 else
24 a4 = 3 * s;
25 x4 = c + a4;
28 return x1 + x2 + x3 + x4;
31 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */