This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH] implement fma() as builtin x87 or SSE intrinsic
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Falk Hueffner <hueffner at informatik dot uni-tuebingen dot de>
- Cc: Uros Bizjak <uros at kss-loka dot si>, gcc-patches at gcc dot gnu dot org, Roger Sayle <roger at eyesopen dot com>
- Date: Fri, 7 May 2004 11:59:18 +0000 (UTC)
- Subject: Re: [RFC PATCH] implement fma() as builtin x87 or SSE intrinsic
- References: <409B5031.5080000@kss-loka.si> <87d65gebo8.fsf@informatik.uni-tuebingen.de>
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