Index: src/compiler/common-operator-reducer.cc |
diff --git a/src/compiler/common-operator-reducer.cc b/src/compiler/common-operator-reducer.cc |
index 12fb0dc77b84766afbeac71ccb30b9ef9ef4bf40..7f26a29f74e583e4d0524f0b39f194abc102e202 100644 |
--- a/src/compiler/common-operator-reducer.cc |
+++ b/src/compiler/common-operator-reducer.cc |
@@ -287,7 +287,6 @@ Reduction CommonOperatorReducer::ReducePhi(Node* node) { |
Reduction CommonOperatorReducer::ReduceReturn(Node* node) { |
DCHECK_EQ(IrOpcode::kReturn, node->opcode()); |
- Node* const value = node->InputAt(1); |
Node* effect = NodeProperties::GetEffectInput(node); |
Node* const control = NodeProperties::GetControlInput(node); |
bool changed = false; |
@@ -298,6 +297,10 @@ Reduction CommonOperatorReducer::ReduceReturn(Node* node) { |
NodeProperties::ReplaceEffectInput(node, effect); |
changed = true; |
} |
+ if (NodeProperties::PastValueIndex(node) != 2) { |
titzer
2017/01/17 16:08:22
This is worth a comment and a TODO. This is doing
titzer
2017/01/17 16:43:21
Please also use the value input count to make this
ahaas
2017/01/17 17:35:54
I added the TODO.
PTAL: I added a helper function
|
+ return NoChange(); |
+ } |
+ Node* const value = node->InputAt(1); |
if (value->opcode() == IrOpcode::kPhi && |
NodeProperties::GetControlInput(value) == control && |
effect->opcode() == IrOpcode::kEffectPhi && |