https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109086
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- OK, so the issue is that expand_simple_binop will not necessarily return a register and emit_cmp_and_jump_insns eventually mangles things. The proposed fix looks OK, but please add a comment like /* Force the result into a register. */