diff options
author | 2017-01-19 02:11:15 +0000 | |
---|---|---|
committer | 2017-01-19 02:11:15 +0000 | |
commit | fee255039e30c1c3dfc70c426c3d176221c3cdf9 (patch) | |
tree | 8207b72cc76513fed9f7b3c01aaa32cd54a87f1c /compiler/optimizing/instruction_simplifier.cc | |
parent | cc99df230feb46ba717252f002d0cc2da6828421 (diff) |
Revert "Load the array class in the compiler for allocations."
libcore test fails.
This reverts commit cc99df230feb46ba717252f002d0cc2da6828421.
Change-Id: I5bac595acd2b240886062e8c1f11f9095ff6a9ed
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index 35f59cb4a4..911bfb9cc6 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->AsNewArray()->GetLength(); + input = input->InputAt(0); 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->AsNewArray()->GetLength() == potential_length; + return potential_array->InputAt(0) == potential_length; } return false; |