]>
Commit | Line | Data |
---|---|---|
a42aa68b JJ |
1 | /* PR tree-optimization/104639 */ |
2 | /* { dg-do compile } */ | |
3 | /* { dg-options "-O2 -fno-tree-pre -g -fdump-tree-optimized" } */ | |
4 | /* { dg-final { scan-tree-dump-not "PHI <" "optimized" } } */ | |
5 | /* { dg-final { scan-tree-dump-times "x_\[0-9]*\\\(D\\\) != 42;" 1 "optimized" } } */ | |
6 | /* { dg-final { scan-tree-dump-times "y_\[0-9]*\\\(D\\\) > 6;" 1 "optimized" } } */ | |
7 | /* { dg-final { scan-tree-dump-times "z_\[0-9]*\\\(D\\\) > 9;" 1 "optimized" } } */ | |
8 | /* { dg-final { scan-tree-dump-times "u_\[0-9]*\\\(D\\\) <= 7;" 1 "optimized" } } */ | |
9 | /* { dg-final { scan-tree-dump-times "v_\[0-9]*\\\(D\\\) <= 42;" 1 "optimized" } } */ | |
10 | ||
11 | int | |
12 | f1 (int x) | |
13 | { | |
14 | if (x == 4) | |
15 | x = 6; | |
16 | int xd = x; | |
17 | return x != 42; | |
18 | } | |
19 | ||
20 | int | |
21 | f2 (int y) | |
22 | { | |
23 | if (y == 4) | |
24 | y = 6; | |
25 | int yd = y; | |
26 | return y > 6; | |
27 | } | |
28 | ||
29 | int | |
30 | f3 (int z) | |
31 | { | |
32 | if (z == 4) | |
33 | z = 6; | |
34 | int zd = z; | |
35 | return z >= 10; | |
36 | } | |
37 | ||
38 | int | |
39 | f4 (int u) | |
40 | { | |
41 | if (u == 4) | |
42 | u = 6; | |
43 | int ud = u; | |
44 | return u < 8; | |
45 | } | |
46 | ||
47 | int | |
48 | f5 (int v) | |
49 | { | |
50 | if (v == 4) | |
51 | v = 6; | |
52 | int vd = v; | |
53 | return v <= 42; | |
54 | } |