Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Issue 2154073002: [Turbofan]: Eliminate the check for -0 if it's not possible/observable. (Closed)

Created:
4 years, 5 months ago by mvstanton
Modified:
4 years, 5 months ago
Reviewers:
Benedikt Meurer, Jarin
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Turbofan]: Eliminate the check for -0 if it's not possible/observable. In int32 multiplication, if we have a positive integer as input, then we know we can't produce a -0 answer. The same is true if truncation is applied (x * y | 0). Without this information, we have to rather annoyingly check if the result of multiplication is 0, then OR the inputs to check for negativity, and possibly return -0. In TurboFan, we'll deopt in this case. BUG= Committed: https://crrev.com/47aaac644216177be86f93f57c9fb3e1ed23dda3 Cr-Commit-Position: refs/heads/master@{#37831}

Patch Set 1 #

Patch Set 2 : Fixes. #

Total comments: 14

Patch Set 3 : Code comments. #

Total comments: 1

Patch Set 4 : REBASE. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -52 lines) Patch
M src/compiler/effect-control-linearizer.cc View 1 2 3 2 chunks +22 lines, -19 lines 0 comments Download
M src/compiler/representation-change.cc View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 2 3 4 chunks +25 lines, -2 lines 0 comments Download
M src/compiler/simplified-operator.h View 2 chunks +12 lines, -1 line 0 comments Download
M src/compiler/simplified-operator.cc View 4 chunks +46 lines, -1 line 0 comments Download
A + test/mjsunit/compiler/math-mul.js View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M test/mjsunit/math-mul.js View 1 2 1 chunk +0 lines, -23 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 33 (19 generated)
mvstanton
Hi Benedikt, Here is the elimination of the -0 case in integer multiplication. Have a ...
4 years, 5 months ago (2016-07-17 16:21:19 UTC) #2
Jarin
lgtm with nits. Was not there a test that checked that we stay optimized even ...
4 years, 5 months ago (2016-07-17 16:37:47 UTC) #6
Benedikt Meurer
Nice. LGTM once comments addressed. https://codereview.chromium.org/2154073002/diff/20001/src/compiler/effect-control-linearizer.cc File src/compiler/effect-control-linearizer.cc (right): https://codereview.chromium.org/2154073002/diff/20001/src/compiler/effect-control-linearizer.cc#newcode1325 src/compiler/effect-control-linearizer.cc:1325: if (mode == CheckForMinusZeroMode::kDontCheckForMinusZero) ...
4 years, 5 months ago (2016-07-17 17:44:08 UTC) #9
Benedikt Meurer
Also can you update the description to add more details about the change. That'll make ...
4 years, 5 months ago (2016-07-17 17:44:57 UTC) #10
Jarin
Now that I have looked a bit more carefully, I have couple more suggestions. https://codereview.chromium.org/2154073002/diff/20001/src/compiler/simplified-lowering.cc ...
4 years, 5 months ago (2016-07-17 18:24:41 UTC) #11
mvstanton
Thanks guys, comments addressed. https://codereview.chromium.org/2154073002/diff/20001/src/compiler/effect-control-linearizer.cc File src/compiler/effect-control-linearizer.cc (right): https://codereview.chromium.org/2154073002/diff/20001/src/compiler/effect-control-linearizer.cc#newcode1325 src/compiler/effect-control-linearizer.cc:1325: if (mode == CheckForMinusZeroMode::kDontCheckForMinusZero) { ...
4 years, 5 months ago (2016-07-18 08:48:58 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2154073002/40001
4 years, 5 months ago (2016-07-18 08:52:29 UTC) #18
Benedikt Meurer
Still LGTM (with new nit). https://codereview.chromium.org/2154073002/diff/40001/src/compiler/simplified-lowering.cc File src/compiler/simplified-lowering.cc (right): https://codereview.chromium.org/2154073002/diff/40001/src/compiler/simplified-lowering.cc#newcode1080 src/compiler/simplified-lowering.cc:1080: void LowerToCheckedInt32MulWithOverflowOp(Node* node, Truncation ...
4 years, 5 months ago (2016-07-18 08:55:38 UTC) #19
commit-bot: I haz the power
Failed to apply patch for src/compiler/effect-control-linearizer.cc: While running git apply --index -3 -p1; error: patch ...
4 years, 5 months ago (2016-07-18 09:24:42 UTC) #21
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-18 09:24:45 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2154073002/60001
4 years, 5 months ago (2016-07-18 11:07:32 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-18 11:34:17 UTC) #30
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-18 11:34:18 UTC) #31
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 11:37:31 UTC) #33
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/47aaac644216177be86f93f57c9fb3e1ed23dda3
Cr-Commit-Position: refs/heads/master@{#37831}

Powered by Google App Engine
This is Rietveld 408576698