This is the mail archive of the
mailing list for the GCC project.
Re: [RFC PATCH] implement fma() as builtin x87 or SSE intrinsic
- From: Roger Sayle <roger at eyesopen dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 May 2004 14:35:57 -0600 (MDT)
- Subject: Re: [RFC PATCH] implement fma() as builtin x87 or SSE intrinsic
On 13 May 2004, Geoff Keating wrote:
> Actually, we should have a separate MULTPLUS rtl operation, so that
> it can be constant-folded properly.
Indeed, though we might need a real_fma function. I assume that to
constant-fold "fma" its sufficient to guarantee that the multiplication
isn't rounded (i.e. the intermediate result has twice as many mantissa
bits as the operands) and allow the final addition to round normally.
Fortunately, real.c's do_multiply returns a bool for exactly this
Also would a single MULTPLUS rtx be sufficient? I remember seeing a
number of operand negatation variants when you improved the fmadd
support for the rs6000. Can these all be handled by allowing NEG
operands to MULTPLUS or were they just canonicalizing the RTL to
ensure that the fmadd instruction gets used?