[LLVMdev] Clarifying FMA-related TargetOptions

Owen Anderson resistor at mac.com
Wed Feb 8 10:48:09 PST 2012


On Feb 8, 2012, at 10:44 AM, James Molloy wrote:

> Hi Owen,
> 
> Having looked into this due to Clang failing PlumHall with it recently I can give an opinion...
> 
> I think !NoExcessFPPrecision covers FMA completely. There are indeed some algorithms which give incorrect results when FMA is enabled, examples being those that do floating point comparisons such as: a * b + c - d. If c == d, it is still possible for that result not to equal a*b, as "+c " will have been fused with the multiply whereas "- d" won't.

I agree that !NoExcessFPPrecision seems like it should cover FMA, but if that that is the case, what does LessPreciseFPMADOption cover?

--Owen



More information about the llvm-dev mailing list