https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70245
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Vladimir Makarov from comment #4) > > I see in peephole a wrong transformation: > > 190: cx:SI=dx:SI > REG_DEAD dx:SI > 95: {cx:SI=cx:SI+[cx:SI];clobber flags:CC;} > > into > > 242: cx:SI=[cx:SI] > 243: {cx:SI=cx:SI+dx:SI;clobber flags:CC;} The pattern in question: (define_peephole2 [(set (match_operand:SI 0 "register_operand") (match_operand:SI 1 "register_operand")) (parallel [(set (match_dup 0) (match_operator:SI 3 "commutative_operator" [(match_dup 0) (match_operand:SI 2 "memory_operand")])) (clobber (reg:CC FLAGS_REG))])] "REGNO (operands[0]) != REGNO (operands[1]) && GENERAL_REGNO_P (REGNO (operands[0])) && GENERAL_REGNO_P (REGNO (operands[1]))" [(set (match_dup 0) (match_dup 4)) (parallel [(set (match_dup 0) (match_op_dup 3 [(match_dup 0) (match_dup 1)])) (clobber (reg:CC FLAGS_REG))])] "operands[4] = replace_rtx (operands[2], operands[0], operands[1]);")