diff options
| author | 2017-01-13 19:48:20 +0000 | |
|---|---|---|
| committer | 2017-01-13 19:48:21 +0000 | |
| commit | 2f12c6581b334e81949016cf262f7ae1dd0737ea (patch) | |
| tree | 1840b3747213d7f2b27ebf43e98f444fc9ef81a6 /compiler/optimizing/induction_var_range.cc | |
| parent | c00735af8acafb0920f84f663c88df4a59894241 (diff) | |
| parent | 6b69e0acb0e4c506ce2587e362c38e36e41e34ab (diff) | |
Merge "Complete unrolling of loops with small body and trip count one."
Diffstat (limited to 'compiler/optimizing/induction_var_range.cc')
| -rw-r--r-- | compiler/optimizing/induction_var_range.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/induction_var_range.cc b/compiler/optimizing/induction_var_range.cc index d5c4c2fa69..6d8ae75460 100644 --- a/compiler/optimizing/induction_var_range.cc +++ b/compiler/optimizing/induction_var_range.cc @@ -368,10 +368,14 @@ void InductionVarRange::Replace(HInstruction* instruction, } } -bool InductionVarRange::IsFinite(HLoopInformation* loop) const { +bool InductionVarRange::IsFinite(HLoopInformation* loop, /*out*/ int64_t* tc) const { HInductionVarAnalysis::InductionInfo *trip = induction_analysis_->LookupInfo(loop, GetLoopControl(loop)); - return trip != nullptr && !IsUnsafeTripCount(trip); + if (trip != nullptr && !IsUnsafeTripCount(trip)) { + IsConstant(trip->op_a, kExact, tc); + return true; + } + return false; } // |