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

Unified Diff: src/compiler/branch-elimination.cc

Issue 2002253003: [turbofan] Properly connect DeoptimizeIf/Unless to effect chain. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix JSCallReducer Created 4 years, 7 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/common-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/branch-elimination.cc
diff --git a/src/compiler/branch-elimination.cc b/src/compiler/branch-elimination.cc
index 427612c36e1152f916750d71336f560d88795309..236fbcad5f931f4bc460850fa7a288e02415a3a3 100644
--- a/src/compiler/branch-elimination.cc
+++ b/src/compiler/branch-elimination.cc
@@ -99,17 +99,17 @@ Reduction BranchElimination::ReduceDeoptimizeConditional(Node* node) {
if (condition_value.IsJust()) {
// If we know the condition we can discard the branch.
if (condition_is_true == condition_value.FromJust()) {
- // We don't to update the conditions here, because we're replacing with
- // the {control} node that already contains the right information.
- return Replace(control);
+ // We don't update the conditions here, because we're replacing {node}
+ // with the {control} node that already contains the right information.
+ ReplaceWithValue(node, dead(), effect, control);
} else {
control = graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager),
frame_state, effect, control);
// TODO(bmeurer): This should be on the AdvancedReducer somehow.
NodeProperties::MergeControlToEnd(graph(), common(), control);
Revisit(graph()->end());
- return Replace(dead());
}
+ return Replace(dead());
}
return UpdateConditions(
node, conditions->AddCondition(zone_, condition, condition_is_true));
« no previous file with comments | « no previous file | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698