diff options
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 6b22f6b..8984a5e 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1381,6 +1381,9 @@ value_replacement (basic_block cond_bb, basic_block middle_bb, } } + if (!single_pred_p (middle_bb)) + return 0; + /* Now optimize (x != 0) ? x + y : y to just x + y. */ gsi = gsi_last_nondebug_bb (middle_bb); if (gsi_end_p (gsi)) |