https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108292
--- Comment #9 from Roger Sayle <roger at nextmovesoftware dot com> --- Another way to avoid the SCALAR_FLOAT_MODE_P problem is: /* Add a REG_EQUAL note to allow condition to be shared. */ rtx note = gen_rtx_fmt_ee (orig_code, mode, op0, op1); /* TMP is (orig_code op0 op1) ? 0 : -1, or swapped. */ note = orig_swapped ? gen_rtx_NEG (mode, node) : gen_rtx_PLUS (mode, note, constm1_rtx); set_unique_reg_note (get_last_insn (), REG_EQUAL, note); i.e. don't attempt to modify the initial comparison; instead tweak the note.