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

Unified Diff: src/compiler/control-reducer.cc

Issue 828823006: [turbofan] Fix control reducer for degenerate cases of self-loop branches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/regress/regress-447526.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/control-reducer.cc
diff --git a/src/compiler/control-reducer.cc b/src/compiler/control-reducer.cc
index bc619bce09069f88be800662c887b0b391ca0351..b17e59dd68361b00a69c49fd9fd49659c9003465 100644
--- a/src/compiler/control-reducer.cc
+++ b/src/compiler/control-reducer.cc
@@ -282,6 +282,7 @@ class ControlReducerImpl {
// Recurse on an input if necessary.
for (Node* const input : node->inputs()) {
+ CHECK_NE(NULL, input);
if (Recurse(input)) return;
}
@@ -496,10 +497,12 @@ class ControlReducerImpl {
TRACE((" IfTrue: #%d:%s\n", use->id(), use->op()->mnemonic()));
edge.UpdateTo(NULL);
ReplaceNode(use, (result == kTrue) ? control : dead());
+ control = NodeProperties::GetControlInput(node); // Could change!
} else if (use->opcode() == IrOpcode::kIfFalse) {
TRACE((" IfFalse: #%d:%s\n", use->id(), use->op()->mnemonic()));
edge.UpdateTo(NULL);
ReplaceNode(use, (result == kTrue) ? dead() : control);
+ control = NodeProperties::GetControlInput(node); // Could change!
}
}
return control;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-447526.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698