[LLVMdev] [RFC] Extend LLVM IR to express "fast-math" at a per-instruction level

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Oct 29 17:18:59 PDT 2012


On 10/29/2012 6:34 PM, Michael Ilseman wrote:
 >
 >    N: no NaNs - ignore the existence of NaNs when convenient

Maybe distinguish between quiet and signaling NaNs?


 > NI - no infs AND no NaNs
 >    x - x ==> 0
 >    Inf > x ==> true

Inf * x ==> 0?

I think that if an infinity appears when NI (or I) is given, the result 
should be left as "undefined".  Similarly with NaNs.  In such cases, 
it's impossible to predict the accuracy of the result, so trying to 
define what happens is pretty much moot.  In this case Inf > x may as 
well be simplified to "false" without any loss of (already absent) meaning.

-Krzysztof



-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list