[LLVMdev] Documentation of fmuladd intrinsic
resistor at mac.com
Fri Jan 11 13:03:51 PST 2013
On Jan 11, 2013, at 11:47 AM, Justin Holewinski <justin.holewinski at gmail.com> wrote:
> Out of curiosity, what is the use-case for isFMAFasterThanMulAndAdd? If a target declares that FMA is actually slower for a given type, why not just declare it as illegal for that type? Wouldn't that accomplish the same thing without another target hook? I feel like I'm missing something here.
FMA is not semantically equivalent to fmul+fadd. If the user called the fma() libm function, we're obligated to translate that into an actual FMA instruction (or a libcall). If they were fmul+fadd with FP_CONTRACT turned on, we're allowed to generate an FMA, but we don't want to if it will be slower than just doing the fmul+fadd.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev