+2015-05-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/65979
+ * config/sh/sh.md (tstsi_t peephole2): Use gen_rtx_SET and
+ take into account the case that operands[1] and operands[2]
+ are the same register.
+
2015-05-26 Michael Matz <matz@suse.de>
PR middle-end/66251
|| REGNO (operands[2]) == REGNO (operands[5]))"
[(const_int 0)]
{
- sh_check_add_incdec_notes (emit_move_insn (operands[2], operands[3]));
+ if (REGNO (operands[1]) == REGNO (operands[2]))
+ operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]));
+
+ sh_check_add_incdec_notes (emit_insn (gen_rtx_SET (operands[2],
+ operands[3])));
emit_insn (gen_tstsi_t (operands[2],
gen_rtx_REG (SImode, (REGNO (operands[1])))));
})
|| REGNO (operands[2]) == REGNO (operands[5]))"
[(const_int 0)]
{
- sh_check_add_incdec_notes (emit_move_insn (operands[2], operands[3]));
+ sh_check_add_incdec_notes (emit_insn (gen_rtx_SET (operands[2],
+ operands[3])));
emit_insn (gen_tstsi_t (operands[2],
gen_rtx_REG (SImode, (REGNO (operands[1])))));
})