This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR rtl-optimization/55093: [4.8 Regression] [x32] -maddress-mode=long failed
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Vladimir Makarov <vmakarov at redhat dot com>
- Date: Mon, 29 Oct 2012 15:15:25 +0000
- Subject: Re: PATCH: PR rtl-optimization/55093: [4.8 Regression] [x32] -maddress-mode=long failed
- References: <20121029130624.GA18506@gmail.com>
"H.J. Lu" <hjl.tools@gmail.com> writes:
> Hi,
>
> This patch changes get_elimination to check register number instead of
> RTX. Tested on Linux/x32 with -maddress-mode=long. OK to install?
FWIW, this doesn't sound right to me, at least not without more justification.
The idea is that things like frame_pointer_rtx are supposed to be unique,
so the original code:
> if ((ep = elimination_map[hard_regno]) != NULL)
> - return ep->from_rtx != reg ? NULL : ep;
> from != hard_regno ? NULL : ep;
ought to be correct in itself. reload did the same thing:
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS];
ep++)
if (ep->from_rtx == x && ep->can_eliminate)
return plus_constant (Pmode, ep->to_rtx, ep->previous_offset);
It sounds on the face of it like the bug is elsewhere.
Richard