diff options
author | 2016-03-25 13:14:53 -0700 | |
---|---|---|
committer | 2016-03-25 15:35:21 -0700 | |
commit | 7829691e27c528ca52753dd98bcb4785e328388a (patch) | |
tree | 5bbb034b0795a0533ce6da6cd83f44c66f36caac /compiler/optimizing/induction_var_analysis.cc | |
parent | b0b38596a4f28725b71f17e13c7b544d926f0d3e (diff) |
Fix bug not accounting for type in induction comparison.
Extended unit tests.
Rationale:
Now that inductions are typed, comparisons should take
the type into account as well.
Change-Id: Ie533bb728d2006390646657573fa743e6fc37ff2
Diffstat (limited to 'compiler/optimizing/induction_var_analysis.cc')
-rw-r--r-- | compiler/optimizing/induction_var_analysis.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/optimizing/induction_var_analysis.cc b/compiler/optimizing/induction_var_analysis.cc index 266cb10ab3..c06d19dce0 100644 --- a/compiler/optimizing/induction_var_analysis.cc +++ b/compiler/optimizing/induction_var_analysis.cc @@ -141,7 +141,7 @@ void HInductionVarAnalysis::VisitLoop(HLoopInformation* loop) { DCHECK(stack_.empty()); map_.clear(); - // Determine the loop's trip count. + // Determine the loop's trip-count. VisitControl(loop); } @@ -917,6 +917,7 @@ bool HInductionVarAnalysis::InductionEqual(InductionInfo* info1, info1->induction_class == info2->induction_class && info1->operation == info2->operation && info1->fetch == info2->fetch && + info1->type == info2->type && InductionEqual(info1->op_a, info2->op_a) && InductionEqual(info1->op_b, info2->op_b); } |