[llvm-commits] [LLVMdev] a question about constant fold for fdiv
Reid Spencer
rspencer at reidspencer.com
Thu Mar 22 20:08:11 PDT 2007
Chris / Jeff,
No need to file a bug. Here's a patch that I think solves this. Could
you (preferably both) review this to make sure I've interpreted the IEEE
754 standard correctly?
Thanks,
Reid.
On Thu, 2007-03-22 at 18:42 -0800, Chris Lattner wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CFold.patch
Type: text/x-patch
Size: 3440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070322/b13a44fb/attachment.bin>
More information about the llvm-commits
mailing list