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: Fix PR 14406 (rs6000 abstf2)


On Wed, Mar 03, 2004 at 04:03:52PM -0500, David Edelsohn wrote:
> 	PR target/14406
> 	* config/rs6000/rs6000.md (abstf2, abstf2+1): Delete define_insn.
> 	(abstf2, abstf2_internal): New define_expand.
> 
> Okay, assuming no regressions.  I hope that scheduling and CSE actually
> produce something better than the raw pattern.  XLC produces:
> 
>         fabs    fp0,fp1
>         fcmpu   0,fp0,fp1
>         bc      BO_IF,CR0_EQ,__L10
>         fneg    fp2,fp2
> __L10:
>         fmr     fp1,fp0
> 	blr

The following is -O1 -mlong-double-128 code.

.foo:
        fabs 0,1
        fcmpu 7,0,1
        beqlr- 7
        fmr 1,0
        fneg 2,2
        blr

I was about to say that gcc does better, but the XLC sequence has
alerted me to the fact that I'm not doing the right thing for -0.0

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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