[LLVMdev] X + 0.0

Jochen Wilhelmy j.wilhelmy at arcor.de
Sat Jul 24 02:59:34 PDT 2010


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).

-Jochen




More information about the llvm-dev mailing list