This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] improve index register recognition
- From: Roman Zippel <zippel at linux-m68k dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 4 Sep 2004 23:03:32 +0200 (CEST)
- Subject: Re: [PATCH] improve index register recognition
- References: <Pine.LNX.4.58.0408100111260.16587@scrub.home><20040903052045.GB20559@redhat.com>
Hi,
On Thu, 2 Sep 2004, Richard Henderson wrote:
> On Tue, Aug 10, 2004 at 01:19:35AM +0200, Roman Zippel wrote:
> > (plus (sign_extract ((mult (reg %d0) 2)) 17 15) (reg %a0))
> >
> > which corresponds to (%a0,%d0.w*2).
>
> Hum, I guess. I'd rather not add codes at random here. I think
> we can safely characterize the index as !OBJECT_P though.
I don't understand, how OBJECT_P helps here.
The problem is that (reg %d0) is not recognized as index register,
regalloc prefers to put it into an address register and sometimes
generating worse code and reload/regrename assumes both registers are
equal and sometimes tries to use a data register as base register.
bye, Roman