https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118922
--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #16) > For #c14 it was actually (at -O2) > r12-5300-gf98f373dd822b35c52356b753d528924e9f89678 Then this should fix it: ``` [apinski@xeond2 gcc]$ git diff ../../gcc/tree-ssa-phiopt.cc diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index f67f52d2d69..133b98d03b8 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -1384,6 +1384,7 @@ value_replacement (basic_block cond_bb, basic_block middle_bb, PHI arguments and this is a single phi where the args are different for the edges e0 and e1 then we can remove the middle basic block. */ if (empty_or_with_defined_p + && single_pred_p (middle_bb) && single_non_singleton_phi_for_edges (phi_nodes (gimple_bb (phi)), e0, e1) == phi) { ``` Let me double check that is the only place that needs the single_pred_p check.