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: (forw) Re: (forw) pr5649 on powerpc (broken splitters)



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


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