Issue 2132 in v8: Canonicalization pass removes i|0 operation too early before it can affect -0 checks

2 views
Skip to first unread message

codesite...@google.com

unread,
May 15, 2012, 5:55:38 PM5/15/12
to v8-...@googlegroups.com
Status: Accepted
Owner: da...@chromium.org
Labels: Type-Bug Priority-Medium

New issue 2132 by veg...@chromium.org: Canonicalization pass removes i|0
operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132


function mul(x, y) {
return (x * y) | 0;
}

mul(0, 0);
mul(0, 0);
%OptimizeFunctionOnNextCall(mul);
mul(0, -1);

will cause deoptimization on minus zero check in mul-i. while in reality
this check should be removed:

0 1 i13 Mul i17 i18 ! -0? <|@

this happens because Canonicalize pass removes BIT_OR with 0 operation
before ComputeMinusZeroChecks happens. Thus -0? check is added to mul
because truncating operation is not present anymore.

codesite...@google.com

unread,
May 16, 2012, 7:46:12 AM5/16/12
to v8-...@googlegroups.com
Updates:
Owner: mma...@chromium.org

Comment #1 on issue 2132 by da...@chromium.org: Canonicalization pass
removes i|0 operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132

Massi, can you please take a look?

codesite...@google.com

unread,
May 18, 2012, 7:48:33 AM5/18/12
to v8-...@googlegroups.com

Comment #2 on issue 2132 by mma...@chromium.org: Canonicalization pass
removes i|0 operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132

This CL fixes it, review needed...
https://chromiumcodereview.appspot.com/10411016


codesite...@google.com

unread,
Sep 7, 2012, 12:40:13 PM9/7/12
to v8-...@googlegroups.com

Comment #3 on issue 2132 by ricardoc...@google.com: Canonicalization pass
removes i|0 operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132

Any progress?

codesite...@google.com

unread,
Sep 20, 2012, 7:48:32 AM9/20/12
to v8-...@googlegroups.com

Comment #4 on issue 2132 by mma...@chromium.org: Canonicalization pass
removes i|0 operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132

Waiting for this to be committed:
https://chromiumcodereview.appspot.com/10837165

with those changes the fix is a one liner...

codesite...@google.com

unread,
Jun 11, 2013, 9:04:52 AM6/11/13
to v8-...@googlegroups.com
Updates:
Status: Fixed
Owner: jkum...@chromium.org
Cc: mma...@chromium.org

Comment #5 on issue 2132 by jkum...@chromium.org: Canonicalization pass
removes i|0 operation too early before it can affect -0 checks
http://code.google.com/p/v8/issues/detail?id=2132

Fixed in r15060.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages