Index: src/compiler/checkpoint-elimination.cc |
diff --git a/src/compiler/checkpoint-elimination.cc b/src/compiler/checkpoint-elimination.cc |
index ce1a86105671088a2e0e9ec82dcad6a3573ca2a5..51ef9459e246c5fbd58634d083c035cc881da861 100644 |
--- a/src/compiler/checkpoint-elimination.cc |
+++ b/src/compiler/checkpoint-elimination.cc |
@@ -41,9 +41,9 @@ Reduction CheckpointElimination::ReduceCheckpoint(Node* node) { |
Reduction CheckpointElimination::ReduceReturn(Node* node) { |
DCHECK_EQ(IrOpcode::kReturn, node->opcode()); |
Node* effect = NodeProperties::GetEffectInput(node); |
- if (effect->opcode() == IrOpcode::kCheckpoint && effect->OwnedBy(node)) { |
- // Any checkpoint that is wholly owned by a {Return} node can never be used |
- // for an actual bailout and can hence be cut out of the effect chain. |
+ if (effect->opcode() == IrOpcode::kCheckpoint) { |
+ // Any {Return} node can never be used to insert a deoptimization point, |
+ // hence checkpoints can be cut out of the effect chain flowing into it. |
Node* replacement = NodeProperties::GetEffectInput(effect); |
NodeProperties::ReplaceEffectInput(node, replacement); |
return Changed(node); |