https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98212
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Or shall it instead do: --- gcc/dojump.c.jj 2020-12-09 15:11:17.042888002 +0100 +++ gcc/dojump.c 2020-12-09 20:34:13.124398356 +0100 @@ -1148,9 +1148,8 @@ do_compare_rtx_and_jump (rtx op0, rtx op if (and_them) { rtx_code_label *dest_label; - prob = prob.invert (); - profile_probability first_prob = prob.split (cprob).invert (); - prob = prob.invert (); + profile_probability first_prob + = prob.split (cprob.invert ()).invert (); /* If we only jump if true, just bypass the second jump. */ if (! if_false_label) { ? With the rationale that for and_them we basically invert the first condition because we pass non-NULL false label and NULL true label, so if first_code is ORDERED and cprob is thus 99% for and_them we will emit UNORDERED and want it to be very unlikely, while if first_code is UNORDERED and cprob is thus 1% for and_them we will emit ORDERED and want it to be very likely (though that case doesn't happen, if first_code is ORDERED, then and_them is always true, if first_code is UNORDERED, then and_them is always false, plus there is one case where first_code is neither of them, then cprob is even.