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

Unified Diff: src/compiler/machine-operator-reducer.cc

Issue 2167643002: [Turbofan] Make the -0 deopt case more efficient in multiplication. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix nit. 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/node-matchers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator-reducer.cc
diff --git a/src/compiler/machine-operator-reducer.cc b/src/compiler/machine-operator-reducer.cc
index 3a723c3196942b425bfb64f50c3db3eb32133e81..4aeeeeacfcf2670d7b19059eeceeaa40dae2616f 100644
--- a/src/compiler/machine-operator-reducer.cc
+++ b/src/compiler/machine-operator-reducer.cc
@@ -264,6 +264,14 @@ Reduction MachineOperatorReducer::Reduce(Node* node) {
return ReplaceBool(m.left().Value() < m.right().Value());
}
if (m.LeftEqualsRight()) return ReplaceBool(false); // x < x => false
+ if (m.left().IsWord32Or() && m.right().Is(0)) {
+ // (x | K) < 0 => true or (K | x) < 0 => true iff K < 0
+ Int32BinopMatcher mleftmatcher(m.left().node());
+ if (mleftmatcher.left().IsNegative() ||
+ mleftmatcher.right().IsNegative()) {
+ return ReplaceBool(true);
+ }
+ }
break;
}
case IrOpcode::kInt32LessThanOrEqual: {
« no previous file with comments | « no previous file | src/compiler/node-matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698