[Webkit-unassigned] [Bug 174034] New: B3ReduceDoubleToFloat incorrectly reduces operations over two double constants

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 30 13:10:16 PDT 2017


            Bug ID: 174034
           Summary: B3ReduceDoubleToFloat incorrectly reduces operations
                    over two double constants
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sbarati at apple.com
                CC: benjamin at webkit.org, fpizlo at apple.com,
                    ggaren at apple.com, gskachkov at gmail.com,
                    jfbastien at apple.com, keith_miller at apple.com,
                    mark.lam at apple.com, msaboff at apple.com,
                    ticaiolima at gmail.com, utatane.tea at gmail.com

e.g, we'll change this program:

a = DoubleConst(c1)
b = DoubleConst(c2)
c = EqualOrUnordered(@a, @b)


a = FloatConst(static_cast<float>(c1))
b = FloatConst(static_cast<float>(c2))
c = EqualOrUnordered(@a, @b)

Which is clearly wrong. The example program where this goes wrong is for a denormal negative zero. We have this comparison:
a = DoubleConst(0x8000000000000001)
b = DoubleConst(0x0000000000000000)
c = EqualOrUnordered(@a, @b)

a = FloatConst(0x80000000)
b = FloatConst(0x00000000)
c = EqualOrUnordered(@a, @b)

And this will produce different program behavior.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170630/a5cec718/attachment.html>

More information about the webkit-unassigned mailing list