| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O1 -fdump-tree-optimized --param logical-op-non-short-circuit=0" } */ |
| 3 |
|
| 4 |
_Bool f1(_Bool a, _Bool b) |
| 5 |
{ |
| 6 |
if (a) |
| 7 |
{ |
| 8 |
if (b) |
| 9 |
return 1; |
| 10 |
else |
| 11 |
return 0; |
| 12 |
} |
| 13 |
return 0; |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
/* There should be no if statements and be fold into just return a & b. |
| 18 |
This can be done without ifcombine but in phiopt where a ? b : 0 is |
| 19 |
converted into a & b. */ |
| 20 |
/* { dg-final { scan-tree-dump-not "if" "optimized" } } */ |
| 21 |
/* { dg-final { scan-tree-dump-times " & " 1 "optimized" } } */ |