This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR rtl-optimization/55093: [4.8 Regression] [x32] -maddress-mode=long failed


"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 < &reg_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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]