https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87047
--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> --- ... and avoiding the wrong branch fixes this bug without regressing pr78120.c testcase: --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -3413,7 +3413,7 @@ noce_process_if_block (struct noce_if_info *if_info) &if_info->else_simple)) return false; - if (else_bb == NULL) + if (0 && else_bb == NULL) if_info->original_cost += then_cost; else if (speed_p) if_info->original_cost += MIN (then_cost, else_cost);