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: IEEE 754 and fused-madd (was: Re: patch: rs6000 specific)


>>>>> Dale Johannesen writes:

Dale> I'm not an expert either.  I have an e-mail in to somebody who is, but
Dale> he hasn't gotten back to me yet.  It seems clear this patch isn't going
Dale> to be accepted as is, so I'll look at it further.

	Okay, I just bounced this around with the IBM compiler guys.

	First, GCC does the same thing as IBM's compiler for PowerPC:
Always uses FMA by default when it matches the expression without unsafe
transformations.  IBM's compiler has an option, like GCC, to disable FMA
and an option, like GCC, to enable unsafe transformations.

	Second, this issue should not be considered two categories (IEEE
754 and non-IEEE 754) but three categories (round every intermediate
expression, excess intermediate precision, and fast-and-loose).

	Third, before IBM even developed a compiler for the original POWER
architecture, both William Kahan and Peter Markstein poured over this
family of instructions while the architecture was being designed and said
FMA was okay.

	So, as far as I am concerned, FMA as implemented by GCC is allowed
by default.  Any transformations to utilize FMA which are allowed by GCC
with the -ffath-math option are not allowed by default.  Only expressions
matching the various FMA instructions can be in the PowerPC MD.

David


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