[llvm-dev] How to make the optimizer eliminate `fadd zeroinitializer`?
Henning Thielemann via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 12 14:47:40 PDT 2016
On Fri, 12 Aug 2016, escha at apple.com wrote:
> Adding ‘fast’ to the fadd should simplify it. Note that adding zero is
> not a no-op in floating point arithmetic; adding negative zero is.
Ah, that is adding zero to negative zero is the corner case!
It seems that
opt -enable-no-infs-fp-math adds ninf globally
opt -enable-no-nans-fp-math adds nnan globally
but I do not see a counterpart for the flags 'nsz', 'arcp' and 'fast'. :-(
More information about the llvm-dev
mailing list