This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: (forw) Re: (forw) pr5649 on powerpc (broken splitters)
- From: Andreas Jaeger <aj at suse dot de>
- To: Geoff Keating <geoffk at redhat dot com>
- Cc: matz at kde dot org, pthomas at suse dot de, gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 Mar 2002 11:32:09 +0100
- Subject: Re: (forw) Re: (forw) pr5649 on powerpc (broken splitters)
- References: <Pine.GSO.4.33.0203011807300.9673-100000@platon><200203092100.g29L0pR24122@desire.geoffk.org>
Is the patch also ok for the release branch? I volunteer to commit it
myself...
Andreas
Geoff Keating <geoffk@geoffk.org> writes:
>> Date: Fri, 1 Mar 2002 18:11:58 +0100 (MET)
>> From: Michael Matz <matz@kde.org>
>
>> On Fri, 1 Mar 2002, Philipp Thomas wrote:
>>
>> > ----- Forwarded message from Geoff Keating <geoffk@geoffk.org> -----
>> >
>> > > sorry to disturb you, but this seems to have escaped your eye, so I'm
>> > > forwarding it. David Edelsohn said this would require input from someone
>> > > with your knowledge.
>> >
>> > Didn't I reply to that? Maybe I started a reply and deleted it...
>> >
>> > It just needs another CLOBBER on the initial pattern, and appropriate
>> > changes to the splitter.
>> >
>> > Actually, it doesn't strictly need another clobber. I can't see an
>> > easy way to explain this to GCC, though.
>>
>> You mean something like the below diff? With that it too doesn't barf on
>> the testcase. I actually tested both variants of the insn: Normally it
>> takes the first one (because it's cheaper, and one clobber less is
>> needed), but I made it more costly (by "=!x,?y" in constraints). After
>> that it indeed allocated both clobbers, and used them to make the split
>> (and match) work.
>
> I couldn't generate a testcase for this---the obvious
>
> void bar(void);
> unsigned foo(int x, unsigned y)
> {
> if ( ( ((unsigned) - abs (x)) >> 31) + y == 0)
> bar();
> }
>
> doesn't quite generate the right pattern, combine doesn't seem to want
> to fold the COMPARE in; so I'm just committing the following.
> Tested on powerpc-eabisim.
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj