| 1 |
/* { dg-do compile } */ |
| 2 |
/* Disable phi-opt as it is no longer confused by predicate which had allowed ifcombine to work in the past. |
| 3 |
Note this testcase is about ifcombine rather than phi-opt. */ |
| 4 |
/* { dg-options "-O1 -fdump-tree-optimized-details-blocks --param logical-op-non-short-circuit=1 -fno-ssa-phiopt" } */ |
| 5 |
|
| 6 |
_Bool f1(_Bool a, _Bool b) |
| 7 |
{ |
| 8 |
if (a) |
| 9 |
{ |
| 10 |
if (b) |
| 11 |
return 1; |
| 12 |
else |
| 13 |
return 0; |
| 14 |
} |
| 15 |
return 0; |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
/* For LOGICAL_OP_NON_SHORT_CIRCUIT, this should be optimized |
| 20 |
into return a & b;, with no ifs. */ |
| 21 |
/* { dg-final { scan-tree-dump-not "if" "optimized" } } */ |
| 22 |
/* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */ |