[LLVMdev] X + 0.0

Dale Johannesen dalej at apple.com
Mon Jul 26 11:23:47 PDT 2010


On Jul 24, 2010, at 2:59 AMPDT, Jochen Wilhelmy wrote:

> Hi!
>
> in visitFAdd I found this comment:
>
> // Check for X+0.0.  Simplify it to X if we know X is not -0.0.
>
> Why is it not allowed to simplify X + 0.0 = X when X may be
> -0.0? Because -0.0 + 0.0 is 0.0 and not -0.0?
>
> For me it would be great if strict floating point processing could
> be switched off (also for X * 0.0 = 0.0).

The DAGCombiner appears to do both of these with -enable-unsafe-fp- 
math .





More information about the llvm-dev mailing list