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

Unified Diff: src/compiler/effect-control-linearizer.cc

Issue 2154073002: [Turbofan]: Eliminate the check for -0 if it's not possible/observable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/representation-change.cc » ('j') | src/compiler/representation-change.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/effect-control-linearizer.cc
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc
index 8701c1923b80c8121efcb371af360bf8eb4fd21d..06618d7c1985fa51e40626129bee8970f78c7e17 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -1308,6 +1308,7 @@ EffectControlLinearizer::LowerCheckedUint32Mod(Node* node, Node* frame_state,
EffectControlLinearizer::ValueEffectControl
EffectControlLinearizer::LowerCheckedInt32Mul(Node* node, Node* frame_state,
Node* effect, Node* control) {
+ CheckForMinusZeroMode mode = CheckMinusZeroModeOf(node->op());
Node* zero = jsgraph()->Int32Constant(0);
Node* lhs = node->InputAt(0);
Node* rhs = node->InputAt(1);
@@ -1321,6 +1322,10 @@ EffectControlLinearizer::LowerCheckedInt32Mul(Node* node, Node* frame_state,
Node* value = graph()->NewNode(common()->Projection(0), projection, control);
+ if (mode == CheckForMinusZeroMode::kDontCheckForMinusZero) {
Benedikt Meurer 2016/07/17 17:44:07 Nit: I'd prefer a positive check here, i.e. if (m
mvstanton 2016/07/18 08:48:58 Done.
+ return ValueEffectControl(value, effect, control);
+ }
+
Node* check_zero = graph()->NewNode(machine()->Word32Equal(), value, zero);
Node* branch_zero = graph()->NewNode(common()->Branch(BranchHint::kFalse),
check_zero, control);
« no previous file with comments | « no previous file | src/compiler/representation-change.cc » ('j') | src/compiler/representation-change.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698