https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97437
--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> --- Trying 7 -> 9: 7: r97:SI=0x2a 9: {flags:CCC=cmp(r97:SI+r98:SI,r97:SI);r99:SI=r97:SI+r98:SI;} REG_DEAD r98:SI REG_DEAD r97:SI Failed to match this instruction: (parallel [ (set (reg:CC 17 flags) (compare:CC (reg:SI 98 [ *b_12(D) ]) (const_int -42 [0xffffffffffffffd6]))) (set (reg:SI 99) (plus:SI (reg:SI 98 [ *b_12(D) ]) (const_int 42 [0x2a]))) ]) On rs6000 we have four special variants for the immediate add-with-carry insn patterns: imm 0, imm -1, imm pos, imm neg. All of these have different canonical RTL.