| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-evrp -fno-tree-fre -fdisable-tree-ethread" } */ |
| 3 |
|
| 4 |
void kill(void); |
| 5 |
|
| 6 |
void foo (int x, int y, int z) |
| 7 |
{ |
| 8 |
// Establish y = [-INF, 54] |
| 9 |
if (y < 55) |
| 10 |
return; |
| 11 |
|
| 12 |
// Establish z == x |
| 13 |
if (z != x) |
| 14 |
return; |
| 15 |
|
| 16 |
// EVRP should transform this to if (0 != 0) |
| 17 |
if (y < 30) |
| 18 |
x = 0; |
| 19 |
|
| 20 |
// # x_1 = PHI <x_5(D)(6), 0(7)> |
| 21 |
// The earlier transformation should make the edge from bb7 |
| 22 |
// unexecutable, allowing x_1 == x_5 to be registered, and |
| 23 |
// then fold away this condition as well. |
| 24 |
if (x != z) |
| 25 |
kill(); |
| 26 |
|
| 27 |
} |
| 28 |
/* { dg-final { scan-tree-dump-not "kill" "evrp" { xfail *-*-* } } } */ |