This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC]: Remove Mem/address type assumption in combiner
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: "Kumar, Venkataramanan" <Venkataramanan dot Kumar at amd dot com>, "Jeff Law (law at redhat dot com)" <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "maxim dot kuvyrkov at linaro dot org" <maxim dot kuvyrkov at linaro dot org>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>, clm <clm at codesourcery dot com>
- Date: Mon, 11 May 2015 12:44:35 -0700
- Subject: Re: [RFC]: Remove Mem/address type assumption in combiner
- Authentication-results: sourceware.org; auth=none
- References: <7794A52CE4D579448B959EED7DD0A4723DCF68C1 at satlexdag06 dot amd dot com> <1431366602 dot 14613 dot 210 dot camel at ubuntu-sellcey> <20150511182215 dot GF2521 at gate dot crashing dot org>
- Reply-to: <sellcey at imgtec dot com>
On Mon, 2015-05-11 at 13:22 -0500, Segher Boessenkool wrote:
> Hi Steve,
>
> On Mon, May 11, 2015 at 10:50:02AM -0700, Steve Ellcey wrote:
> > This patch broke a number of MIPS tests, specifically mips32r6 tests
> > that look for the lsa instruction (load scaled address) which shifts one
> > register and then adds it to a second register. I am not sure if this
> > needs to be addressed in combine.c or if we need to add a peephole
> > optimization to mips.md to handle the new instruction sequence. What do
> > you think? Is the change here what you would expect to see from your
> > patch?
>
> Yes, this is as expected. AFAICS the only change you need in the
> MIPS backend is to change the "<GPR:d>lsa" pattern to match a shift
> instead of a mult (and change the "const_immlsa_operand" predicate
> to just match 1..4 instead of the powers).
>
>
> Segher
Hm, I thought it was going to be more complicated than that, but it
seems to be working. I will do a complete test run and then submit a
patch.
Steve Ellcey