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: [3.4-bib, Patch] rs6000 floating point multiply-add instructions


Andrew Pinski <pinskia@physics.uc.edu> writes:

> Since I was see some of the rs6000 floating point multiply-add
> instructions being used in the fsf version of the compiler but they
> were generated by the Apple compiler, I thought I would look to
> see what is going on.  I saw that in the md file of Apple's version it
> contains more define_insn for the instructions so they could be
> matched with different ways of saying them.
> 
> 
> ChangeLog:
> 2002-11-18  Andrew Pinski  <pinskia@physics.uc.edu>
> 
> 	* config/rs6000/rs6000.md (fmadd): Add a comment
> 	(fmsub): New patterns.  (fnmadd): New patterns.
> 	(fnmsub): New patterns. (fmadds): Add a comment
> 	(fmsubs): New patterns.  (fnmadds): New patterns.
> 	(fnmsubs): New patterns.
> 
> 
> 
> 
> testsuite/ChangeLog:
> 2002-11-18  Andrew Pinski  <pinskia@physics.uc.edu>
> 
> 	* gcc.dg/ppc-fused-multiply-add-1.c: New test.
> 	* gcc.dg/ppc-fused-multiply-add-2.c: New test.

Your testcases seem to be identical, did you miss something?

Anyway, the first one,

>         temp=temp-temp2*temp3;

can't be optimised to a fnmsub in the absence of -ffast-math.  If
'temp', 'temp2', and 'temp3' are all +0, the original expression gives
+0, but fnmsub gives -0.

The original discussion of this patch happened at
<http://gcc.gnu.org/ml/gcc-patches/2001-12/msg00368.html>.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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