Index: src/compiler/node-properties.cc |
diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc |
index 9e665d10e992087229cfca18bcb96bd9ace8bad8..0aeea93161e1aa814b56edb95dc6257bd023ba1a 100644 |
--- a/src/compiler/node-properties.cc |
+++ b/src/compiler/node-properties.cc |
@@ -163,16 +163,8 @@ void NodeProperties::RemoveNonValueInputs(Node* node) { |
void NodeProperties::MergeControlToEnd(Graph* graph, |
CommonOperatorBuilder* common, |
Node* node) { |
- // Connect the node to the merge exiting the graph. |
- Node* end_pred = NodeProperties::GetControlInput(graph->end()); |
- if (end_pred->opcode() == IrOpcode::kMerge) { |
- int inputs = end_pred->op()->ControlInputCount() + 1; |
- end_pred->AppendInput(graph->zone(), node); |
- end_pred->set_op(common->Merge(inputs)); |
- } else { |
- Node* merge = graph->NewNode(common->Merge(2), end_pred, node); |
- NodeProperties::ReplaceControlInput(graph->end(), merge); |
- } |
+ graph->end()->AppendInput(graph->zone(), node); |
+ graph->end()->set_op(common->End(graph->end()->InputCount())); |
} |