summaryrefslogtreecommitdiff
path: root/compiler/optimizing/induction_var_range.cc
diff options
context:
space:
mode:
author Hiroshi Yamauchi <yamauchi@google.com> 2017-01-19 02:11:15 +0000
committer Hiroshi Yamauchi <yamauchi@google.com> 2017-01-19 02:11:15 +0000
commitfee255039e30c1c3dfc70c426c3d176221c3cdf9 (patch)
tree8207b72cc76513fed9f7b3c01aaa32cd54a87f1c /compiler/optimizing/induction_var_range.cc
parentcc99df230feb46ba717252f002d0cc2da6828421 (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/induction_var_range.cc')
-rw-r--r--compiler/optimizing/induction_var_range.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc
index 3973985338..6d8ae75460 100644
--- a/compiler/optimizing/induction_var_range.cc
+++ b/compiler/optimizing/induction_var_range.cc
@@ -114,7 +114,12 @@ static bool IsMaxAtHint(
}
} else {
*suitable = instruction;
- return HuntForDeclaration(instruction) == hint;
+ while (instruction->IsArrayLength() ||
+ instruction->IsNullCheck() ||
+ instruction->IsNewArray()) {
+ instruction = instruction->InputAt(0);
+ }
+ return instruction == hint;
}
return false;
}
@@ -624,7 +629,7 @@ InductionVarRange::Value InductionVarRange::GetFetch(HInstruction* instruction,
if (chase_hint_ == nullptr) {
return is_min ? Value(0) : Value(std::numeric_limits<int32_t>::max());
} else if (instruction->InputAt(0)->IsNewArray()) {
- return GetFetch(instruction->InputAt(0)->AsNewArray()->GetLength(), trip, in_body, is_min);
+ return GetFetch(instruction->InputAt(0)->InputAt(0), trip, in_body, is_min);
}
} else if (instruction->IsTypeConversion()) {
// Since analysis is 32-bit (or narrower), chase beyond widening along the path.