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: [RFC PATCH] implement fma() as builtin x87 or SSE intrinsic


On Fri, 7 May 2004, Falk Hueffner wrote:

> It seems fma simply does x * y + z. Wouldn't it be more sensible to
> expand this in some machine-independent part and rely on the
> machine-depentend part to reassemble it to something sensible? That
> would save some code and it could also be picked up if the user really
> wrote x * y + z.

Since the point of fma is to avoid intermediate rounding errors, expanding
it to a form that might allow such errors would be silly (and we don't
have the tree flags yet to say "this expression *must* be contracted").  
Converting x * y + z to fma is OK depending on the state of the
FP_CONTRACT pragma (of which the default state is implementation-defined,
so if we implement the pragma it needn't default to on only with
-ffast-math).

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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