diff options
| author | 2015-12-09 20:35:32 +0000 | |
|---|---|---|
| committer | 2015-12-09 20:35:32 +0000 | |
| commit | f1975e432859101bf8e7b0fd33f6052cafb0f9b2 (patch) | |
| tree | bad5813c2abd5c3a9c302767290f9b1b9360b707 /compiler/optimizing/induction_var_analysis.cc | |
| parent | 7cbd95c2fb7ca3d1391ec92d1be2d81863e63dd2 (diff) | |
| parent | 4b467ed97bc5886fb800209c0ee94df10163b88d (diff) | |
Merge "Simplify and rename IsLoopInvariant() test."
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 fdf8cc9c1f..0b7fdf85ea 100644 --- a/compiler/optimizing/induction_var_analysis.cc +++ b/compiler/optimizing/induction_var_analysis.cc @@ -705,7 +705,8 @@ HInductionVarAnalysis::InductionInfo* HInductionVarAnalysis::LookupInfo(HLoopInf return loop_it->second; } } - if (loop->IsLoopInvariant(instruction, true)) { + if (loop->IsDefinedOutOfTheLoop(instruction)) { + DCHECK(instruction->GetBlock()->Dominates(loop->GetPreHeader())); InductionInfo* info = CreateInvariantFetch(instruction); AssignInfo(loop, instruction, info); return info; |