[cfe-dev] [llvm-dev] RFC: change -fp-contract=off to actually disable FMAs
Stephen Canon via cfe-dev
cfe-dev at lists.llvm.org
Fri Jul 12 10:16:55 PDT 2019
> On Jul 12, 2019, at 12:32 PM, Scott Manley <rscottmanley at gmail.com> wrote:
> I think that makes sense, but the end result is the same. Wouldn't you agree that -fp-contract=off still contracts floating point expressions with the initial example I posted? That is the core of what I'm trying to resolve here.
Yes, absolutely. The `fast` flag licenses many transforms that are not allowed in the default floating-point model, including contraction. So, yes, it’s being contracted in your initial example, and that’s OK!
> I still have some confusion of what FMAD is supposed to be. Is FMAD actually MAD? Or is it something else? I am fine with leaving it alone if FMAD is not actually contracting floating point operations.
/// FMAD - Perform a * b + c, while getting the same result as the
/// separately rounded operations.
It does exactly what it says on the tin. It represents an instruction that produces exactly the same result as FADD(FMUL(a,b), c). No contraction is occurring when such a node is formed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev