PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-20.c
blobcf3e1b3a0e78d22691db80dc1121bf910ed89b30
1 /* Verify straight-line strength reduction for multiply candidates
2 with stride in inconsistent positions. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 int
8 f (int c, int s)
10 int x1, x2, y1, y2;
12 y1 = c + 2;
13 x1 = y1 * s;
14 y2 = y1 + 2;
15 x2 = s * y2;
16 return x1 + x2;
19 /* { dg-final { scan-tree-dump-times " \\* s" 1 "optimized" } } */
20 /* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
21 /* { dg-final { cleanup-tree-dump "optimized" } } */