Index: src/compiler/js-call-reducer.cc |
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc |
index 3a88a90c978102d9f08434a7d317ed068601a4ea..5e4a8f47a9588ed9edb554e5b4d21517b558c8ad 100644 |
--- a/src/compiler/js-call-reducer.cc |
+++ b/src/compiler/js-call-reducer.cc |
@@ -124,7 +124,14 @@ Reduction JSCallReducer::ReduceFunctionPrototypeApply(Node* node) { |
Node* arg_array = NodeProperties::GetValueInput(node, 3); |
if (arg_array->opcode() != IrOpcode::kJSCreateArguments) return NoChange(); |
for (Edge edge : arg_array->use_edges()) { |
- if (edge.from()->opcode() == IrOpcode::kStateValues) continue; |
+ Node* user = edge.from(); |
+ // Ignore uses as frame state's locals or parameters. |
+ if (user->opcode() == IrOpcode::kStateValues) continue; |
+ // Ignore uses as frame state's accumulator. |
+ if (user->opcode() == IrOpcode::kFrameState && |
+ user->InputAt(2) == arg_array) { |
+ continue; |
+ } |
if (!NodeProperties::IsValueEdge(edge)) continue; |
if (edge.from() == node) continue; |
return NoChange(); |