[llvm-commits] [llvm] r48170 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Dale Johannesen dalej at apple.com
Mon Mar 10 13:37:04 PDT 2008


>
While you're at it,

>   // fold (sub x, x) -> 0

is unsafe for IEEE floating point (x==NaN).  There's a comment in gcc  
saying

          This is unsafe for certain floats even in non-IEEE formats.

but it does not say what these might be.  However, gcc requires the  
maximally aggressive -funsafe-math-optimizations to do this one, not  
just the more specific "do not worry about NaNs" flag.

It is also unsafe if x is volatile.




More information about the llvm-commits mailing list