return;
/* See a comment for the input operand above. */
narrow_reload_pseudo_class (out_rtx, goal_class);
- if (find_reg_note (curr_insn, REG_UNUSED, out_rtx) == NULL_RTX
- && !ira_former_scratch_p (REGNO (SUBREG_P (out_rtx)
- ? SUBREG_REG (out_rtx) : out_rtx)))
+ reg = SUBREG_P (out_rtx) ? SUBREG_REG (out_rtx) : out_rtx;
+ if (find_reg_note (curr_insn, REG_UNUSED, reg) == NULL_RTX
+ && (!REG_P (reg) || !ira_former_scratch_p (REGNO (reg))))
{
- reg = SUBREG_P (out_rtx) ? SUBREG_REG (out_rtx) : out_rtx;
start_sequence ();
/* If we had strict_low_part, use it also in reload to keep other
parts unchanged but do it only for regs as strict_low_part
&& find_reg_note (curr_insn, REG_UNUSED, old) == NULL_RTX
/* OLD can be an equivalent constant here. */
&& !CONSTANT_P (old)
- && !ira_former_scratch_p (REGNO (old)))
+ && (!REG_P(old) || !ira_former_scratch_p (REGNO (old))))
{
start_sequence ();
lra_emit_move (type == OP_INOUT ? copy_rtx (old) : old, new_reg);