Index: src/compiler/simplified-lowering.cc |
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc |
index e3ddf5c461d6dadc0f63736d1d3d47855873c2cf..8ac2a85dc92054f8e98d0e0ed0330ce22ef97cd0 100644 |
--- a/src/compiler/simplified-lowering.cc |
+++ b/src/compiler/simplified-lowering.cc |
@@ -596,7 +596,8 @@ class RepresentationSelector { |
ElementAccess access = ElementAccessOf(node->op()); |
ProcessInput(node, 0, changer_->TypeForBasePointer(access)); |
ProcessInput(node, 1, kMachInt32); // element index |
- ProcessRemainingInputs(node, 2); |
+ ProcessInput(node, 2, kMachInt32); // length |
+ ProcessRemainingInputs(node, 3); |
SetOutput(node, AssumeImplicitFloat32Change(access.machine_type)); |
if (lower()) lowering->DoLoadElement(node); |
break; |
@@ -605,8 +606,9 @@ class RepresentationSelector { |
ElementAccess access = ElementAccessOf(node->op()); |
ProcessInput(node, 0, changer_->TypeForBasePointer(access)); |
ProcessInput(node, 1, kMachInt32); // element index |
- ProcessInput(node, 2, AssumeImplicitFloat32Change(access.machine_type)); |
- ProcessRemainingInputs(node, 3); |
+ ProcessInput(node, 2, kMachInt32); // length |
+ ProcessInput(node, 3, AssumeImplicitFloat32Change(access.machine_type)); |
+ ProcessRemainingInputs(node, 4); |
SetOutput(node, 0); |
if (lower()) lowering->DoStoreElement(node); |
break; |
@@ -867,6 +869,7 @@ void SimplifiedLowering::DoLoadElement(Node* node) { |
const ElementAccess& access = ElementAccessOf(node->op()); |
node->set_op(machine()->Load(access.machine_type)); |
node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); |
+ node->RemoveInput(2); |
} |
@@ -877,6 +880,7 @@ void SimplifiedLowering::DoStoreElement(Node* node) { |
node->set_op( |
machine()->Store(StoreRepresentation(access.machine_type, kind))); |
node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); |
+ node->RemoveInput(2); |
} |