[patch 4/N][rs6000, cft] -mfused-add cleanup

Richard Henderson rth@redhat.com
Thu Nov 11 00:46:00 GMT 2010


This patch continues the elimination -mfused-madd in favor of -ffp-contract,
converting the rs6000 backend.

This port was a whole lot trickier:

First, it kinda-sorta attempted use of FMA in its reciprical generation
functions.  I made the assumption that these algorithms actually rely on the
use of FMA, and the testing of !TARGET_FUSED_MADD is actually a red-herring
and should *not* be converted to test fp-contract.  So I just converted that
code to always emit the FMA.

Second, this target has

	-fma(a,b,c)	(call this NFMA)
	-fma(a,b,-c)	(call this NFMS)

instead of

	fma(-a,b,c)	(generically named FNMA)
	fma(-a,b,-c)	(generically named FNMS)

I represent the NFM[AS] instructions correctly, always.  But if signed zeros
are allowed to be ignored, I expand the FNM[AS] with the NFM[AS] patterns.

I make no attempt to create NFM[AS] optabs; I'm not convinced that it's really
necessary.  I think combine will be able to handle these just fine.  I'm happy
to be proven wrong, however.

This patch is UNTESTED beyond a cross-compile and running simple tests by hand.
I'm hoping that Meissner can test this faster than me pushing this through the
gcc compile farm -- it took 2 days to get a full test cycle done last time...


r~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-ppc-move-mfused-madd-to-ffp-contract.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101111/00331995/attachment.ksh>


More information about the Gcc-patches mailing list