RESOLVED FIXED 174034
B3ReduceDoubleToFloat incorrectly reduces operations over two double constants
https://bugs.webkit.org/show_bug.cgi?id=174034
Summary B3ReduceDoubleToFloat incorrectly reduces operations over two double constants
Saam Barati
Reported 2017-06-30 13:10:16 PDT
e.g, we'll change this program: a = DoubleConst(c1) b = DoubleConst(c2) c = EqualOrUnordered(@a, @b) into: 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) into: a = FloatConst(0x80000000) b = FloatConst(0x00000000) c = EqualOrUnordered(@a, @b) And this will produce different program behavior.
Attachments
patch (5.95 KB, patch)
2017-06-30 14:17 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2017-06-30 14:09:33 PDT
Saam Barati
Comment 2 2017-06-30 14:17:54 PDT
WebKit Commit Bot
Comment 3 2017-06-30 16:37:04 PDT
Comment on attachment 314289 [details] patch Clearing flags on attachment: 314289 Committed r219026: <http://trac.webkit.org/changeset/219026>
WebKit Commit Bot
Comment 4 2017-06-30 16:37:06 PDT
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 5 2017-06-30 22:52:03 PDT
(In reply to WebKit Commit Bot from comment #3) > Comment on attachment 314289 [details] > patch > > Clearing flags on attachment: 314289 > > Committed r219026: <http://trac.webkit.org/changeset/219026> It broke the GCC build, see build.webkit.org for details, for example the GTK bots and AArch64 bot.
Yusuke Suzuki
Comment 7 2017-07-01 02:36:41 PDT
Saam Barati
Comment 8 2017-07-01 13:49:04 PDT
(In reply to Yusuke Suzuki from comment #7) > Committed r219047: <http://trac.webkit.org/changeset/219047> Thanks!
Note You need to log in before you can comment on or make changes to this bug.