This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix Sparc shift optimization
- From: Jan Hubicka <jh at suse dot cz>
- To: "David S. Miller" <davem at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 May 2002 15:02:23 +0200
- Subject: Re: Fix Sparc shift optimization
- References: <20020505.155813.85745762.davem@redhat.com>
>
> Jakub asked me to regression test this fix for him on
> the mainline and I have done so.
>
> The problem is that our attempt to emit add for shifts by
> constant 1 wasn't done correctly. Instead of using seperate
> patterns, just handle it with the normal shift pattern, computing the
> attributes using a new const1_operand predicate code.
I think even cleaner approach can be to add post reload splitters to turn
shifts into adds as i386 does.
This avoids some of the attribute hackery around.
Honza