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

Unified Diff: src/compiler/node-matchers.h

Issue 756643002: [turbofan] Fix lea matching. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unit test & fix Created 6 years, 1 month 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 | test/mjsunit/regress/regress-lea-matching.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node-matchers.h
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
index c748c61e6a9cc0624c074bde0a579378b067abff..f115d9b25c029d835cda11000ebb32ab80167644 100644
--- a/src/compiler/node-matchers.h
+++ b/src/compiler/node-matchers.h
@@ -294,14 +294,16 @@ struct ScaledWithOffsetMatcher {
Node* left_left = left_matcher.left().node();
Node* left_right = left_matcher.right().node();
if (left_matcher.HasScaledInput() && left_left->OwnedBy(left)) {
- scaled_ = left_matcher.ScaledInput();
- scale_exponent_ = left_matcher.ScaleExponent();
if (left_matcher.right().HasValue()) {
// ((S + C) + O)
+ scaled_ = left_matcher.ScaledInput();
+ scale_exponent_ = left_matcher.ScaleExponent();
constant_ = left_right;
offset_ = right;
} else if (base_matcher.right().HasValue()) {
// ((S + O) + C)
+ scaled_ = left_matcher.ScaledInput();
+ scale_exponent_ = left_matcher.ScaleExponent();
offset_ = left_right;
constant_ = right;
} else {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-lea-matching.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698