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

Unified Diff: src/compiler/simplified-lowering.cc

Issue 966423002: [turbofan] Fix deferred replacement in simplified lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | test/mjsunit/compiler/regress-463056.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index b3050719883c0467bf97f8d0610e494a3142c014..f0d1241559975b02a02904a6f2dbbaeb7d2a3bc9 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -124,6 +124,11 @@ class RepresentationSelector {
Node* node = *i;
Node* replacement = *(++i);
node->ReplaceUses(replacement);
+ // We also need to replace the node in the rest of the vector.
+ for (NodeVector::iterator j = i + 1; j != replacements_.end(); ++j) {
+ ++j;
+ if (*j == node) *j = replacement;
+ }
}
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-463056.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698