[LLVMdev] a question about constant fold for fdiv
Chris Lattner
sabre at nondot.org
Thu Mar 22 19:42:26 PDT 2007
On Thu, 22 Mar 2007, Jeff Cohen wrote:
> Jeff Cohen wrote:
>> The standard apparently doesn't explicitly handle 0/0, but the position of
>> the IEEE appears to be that it should yield a NaN of the appropriate sign.
>> See http://standards.ieee.org/reading/ieee/interp/754-1985.html
>
> OK, it does explicitly handle it. My reading comprehension seems to be
> lacking right now :(
>
> http://754r.ucbtest.org/standards/754xml.html#invalid-exception
>
> The above lists all operations that yield a NaN.
Sounds like a bug, please file it or fix it :) The code in question is
VMCore/ConstantFold.cpp:654. It should produce the appropriately signed
NaN instead of Inf.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list