diff options
| author | 2017-01-18 15:43:07 +0000 | |
|---|---|---|
| committer | 2017-01-18 15:43:08 +0000 | |
| commit | c3b7bf3bcc55ec3c684210176ff6ddeb9d33ac19 (patch) | |
| tree | e35684d252ac9ff1f505f142f2ce62289e74ae93 /compiler/optimizing/induction_var_range.cc | |
| parent | 2ee01bff00e386c4bb315e148bac745613cbb7a3 (diff) | |
| parent | cc99df230feb46ba717252f002d0cc2da6828421 (diff) | |
Merge "Load the array class in the compiler for allocations."
Diffstat (limited to 'compiler/optimizing/induction_var_range.cc')
| -rw-r--r-- | compiler/optimizing/induction_var_range.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc index 6d8ae75460..3973985338 100644 --- a/compiler/optimizing/induction_var_range.cc +++ b/compiler/optimizing/induction_var_range.cc @@ -114,12 +114,7 @@ static bool IsMaxAtHint( } } else { *suitable = instruction; - while (instruction->IsArrayLength() || - instruction->IsNullCheck() || - instruction->IsNewArray()) { - instruction = instruction->InputAt(0); - } - return instruction == hint; + return HuntForDeclaration(instruction) == hint; } return false; } @@ -629,7 +624,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)->InputAt(0), trip, in_body, is_min); + return GetFetch(instruction->InputAt(0)->AsNewArray()->GetLength(), trip, in_body, is_min); } } else if (instruction->IsTypeConversion()) { // Since analysis is 32-bit (or narrower), chase beyond widening along the path. |