| Index: src/compiler/node-properties.cc
|
| diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc
|
| index 1575310a7f3a26517fba1289cbdde6263c783159..b51479fdee68b41bb356b1f97d792ca3f225ed2b 100644
|
| --- a/src/compiler/node-properties.cc
|
| +++ b/src/compiler/node-properties.cc
|
| @@ -152,14 +152,18 @@ void NodeProperties::RemoveNonValueInputs(Node* node) {
|
|
|
| // static
|
| void NodeProperties::ReplaceWithValue(Node* node, Node* value, Node* effect) {
|
| - DCHECK(node->op()->ControlOutputCount() == 0);
|
| if (!effect && node->op()->EffectInputCount() > 0) {
|
| effect = NodeProperties::GetEffectInput(node);
|
| }
|
|
|
| - // Requires distinguishing between value and effect edges.
|
| + // Requires distinguishing between value, effect and control edges.
|
| for (Edge edge : node->use_edges()) {
|
| - if (IsEffectEdge(edge)) {
|
| + if (IsControlEdge(edge)) {
|
| + DCHECK_EQ(IrOpcode::kIfSuccess, edge.from()->opcode());
|
| + Node* control = NodeProperties::GetControlInput(node);
|
| + edge.from()->ReplaceUses(control);
|
| + edge.UpdateTo(NULL);
|
| + } else if (IsEffectEdge(edge)) {
|
| DCHECK_NOT_NULL(effect);
|
| edge.UpdateTo(effect);
|
| } else {
|
|
|