| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-O2 -fdump-tree-all-stats" } |
| 3 |
|
| 4 |
void stuff(); |
| 5 |
|
| 6 |
void foo (float a, int cond) |
| 7 |
{ |
| 8 |
float x; |
| 9 |
|
| 10 |
if (cond) |
| 11 |
x = a; |
| 12 |
else |
| 13 |
x = 8.0; |
| 14 |
|
| 15 |
/* Even though on the BB2->BB4 path, x_1 and a_4 are equivalent, we cannot |
| 16 |
fold x_1 == a_4 because of possible NANs: |
| 17 |
|
| 18 |
<bb 4> |
| 19 |
# x_1 = PHI <a_4(D)(2), 8.0e+0(3)> |
| 20 |
if (x_1 == a_4(D)) |
| 21 |
*/ |
| 22 |
if (x == a) |
| 23 |
stuff(); |
| 24 |
} |
| 25 |
|
| 26 |
// { dg-final { scan-tree-dump-not "Jumps threaded" "threadfull1" } } |
| 27 |
// { dg-final { scan-tree-dump-not "Jumps threaded" "threadfull2" } } |