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 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
eventuality.

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?

Roger
--


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