+Mon Oct 29 19:22:07 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * reload1.c (eliminate_regs): Test for reg_renumber being allocated
+ before referencing it.
+
2001-10-26 DJ Delorie <dj@redhat.com>
* config/rs6000/sysv4.h (LINK_SPEC): Allow -msdata=none to
return plus_constant (ep->to_rtx, ep->previous_offset);
}
- else if (reg_renumber[regno] < 0 && reg_equiv_constant
- && reg_equiv_constant[regno]
+ else if (reg_renumber && reg_renumber[regno] < 0
+ && reg_equiv_constant && reg_equiv_constant[regno]
&& ! CONSTANT_P (reg_equiv_constant[regno]))
return eliminate_regs (copy_rtx (reg_equiv_constant[regno]),
mem_mode, insn);
rtx new0 = eliminate_regs (XEXP (x, 0), mem_mode, insn);
rtx new1 = eliminate_regs (XEXP (x, 1), mem_mode, insn);
- if (new0 != XEXP (x, 0) || new1 != XEXP (x, 1))
+ if (reg_renumber && (new0 != XEXP (x, 0) || new1 != XEXP (x, 1)))
{
/* If one side is a PLUS and the other side is a pseudo that
didn't get a hard register but has a reg_equiv_constant,
{
new = eliminate_regs (XEXP (x, 1), mem_mode, insn);
if (new != XEXP (x, 1))
- return gen_rtx_fmt_ee (GET_CODE (x), GET_MODE (x), XEXP (x, 0), new);
+ return
+ gen_rtx_fmt_ee (GET_CODE (x), GET_MODE (x), XEXP (x, 0), new);
}
return x;