[RFC PATCH for 9] rs6000: Ordered comparisons (PR56864)

Segher Boessenkool segher@kernel.crashing.org
Tue Mar 27 18:48:00 GMT 2018


Hi again,

On Tue, Mar 27, 2018 at 07:59:30PM +0200, Uros Bizjak wrote:
> > (the two compares were combined, by fwprop1) but without the flag we get
> >
> >         fcmpo 5,1,2
> >         li 3,-1
> >         bltlr 5
> >         mfcr 3,4
> >         rlwinm 3,3,22,1
> >         fcmpo 7,1,2
> >         blr
> >
> > (it's still combined, but the redundant compare isn't deleted).
> 
> Yes, I think this case will be fixed by wrapping the compare inside UNSPEC.

I don't think that will work, but I haven't tried it yet.  Will do.

> > Are ordered compares faster than unordered on x86?  Strange stuff.
> 
> Not faster, but on x87 unordered compares operate only with registers,
> while some (legacy) ordered can also use memory operands.

Ah ok.  Nasty.  Maybe you should only do ordered by default for the legacy
compares then?


Segher



More information about the Gcc-patches mailing list