summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_simplifier.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-01-19 08:59:37 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2017-01-19 09:32:17 +0000
commite761bccf9f0d884cc4d4ec104568cef968296492 (patch)
tree05a2d20d61c0e91270df2747f0c242433b5ce62b /compiler/optimizing/instruction_simplifier.cc
parentb0355130e38034db6b904783a00f74a3524e1881 (diff)
Revert "Revert "Load the array class in the compiler for allocations.""
This reverts commit fee255039e30c1c3dfc70c426c3d176221c3cdf9. Change-Id: I02b45f9a659d872feeb35df40b42c1be9878413a
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r--compiler/optimizing/instruction_simplifier.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 911bfb9cc6..35f59cb4a4 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -777,7 +777,7 @@ void InstructionSimplifierVisitor::VisitArrayLength(HArrayLength* instruction) {
// If the array is a NewArray with constant size, replace the array length
// with the constant instruction. This helps the bounds check elimination phase.
if (input->IsNewArray()) {
- input = input->InputAt(0);
+ input = input->AsNewArray()->GetLength();
if (input->IsIntConstant()) {
instruction->ReplaceWith(input);
}
@@ -1774,7 +1774,7 @@ static bool IsArrayLengthOf(HInstruction* potential_length, HInstruction* potent
}
if (potential_array->IsNewArray()) {
- return potential_array->InputAt(0) == potential_length;
+ return potential_array->AsNewArray()->GetLength() == potential_length;
}
return false;