PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-30.c
blob5fea3d3db82c17c68d3a1f03cf81a763f4b06f26
1 /* Verify straight-line strength reduction fails for simple integer addition
2 with casts thrown in when -fwrapv is used. */
4 /* { dg-do compile { target { long_neq_int } } } */
5 /* { dg-options "-O3 -fdump-tree-dom2 -fwrapv" } */
7 long
8 f (int s, long c)
10 int a1, a2, a3;
11 long x1, x2, x3, x;
13 a1 = 2 * s;
14 x1 = c + a1;
15 a2 = 4 * s;
16 x2 = c + a2;
17 a3 = 6 * s;
18 x3 = c + a3;
19 x = x1 + x2 + x3;
20 return x;
23 /* { dg-final { scan-tree-dump-times " \\* " 3 "dom2" } } */
24 /* { dg-final { cleanup-tree-dump "dom2" } } */