diff options
author | Aart Bik <ajcbik@google.com> | 2017-04-17 16:34:52 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-04-17 16:34:54 +0000 |
commit | 27fb1dc467effbd8df43e6207743fdb7bcee4044 (patch) | |
tree | 8fbac3e292fe9cdb0f30e28a1bc9007d503827cf /compiler/optimizing/loop_optimization.cc | |
parent | 35fc819cd95fbd25eef5d729b81976987a8c6c7d (diff) | |
parent | d86c08555905dbc42233a506683e3995446fc113 (diff) |
Merge "Fixed bug on pending environment use of termination condition. With regression test."
Diffstat (limited to 'compiler/optimizing/loop_optimization.cc')
-rw-r--r-- | compiler/optimizing/loop_optimization.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc index 4710b32e9c..8e88c1ec7f 100644 --- a/compiler/optimizing/loop_optimization.cc +++ b/compiler/optimizing/loop_optimization.cc @@ -1082,7 +1082,10 @@ bool HLoopOptimization::TrySetSimpleLoopHeader(HBasicBlock* block) { HInstruction* s = block->GetFirstInstruction(); if (s != nullptr && s->IsSuspendCheck()) { HInstruction* c = s->GetNext(); - if (c != nullptr && c->IsCondition() && c->GetUses().HasExactlyOneElement()) { + if (c != nullptr && + c->IsCondition() && + c->GetUses().HasExactlyOneElement() && // only used for termination + !c->HasEnvironmentUses()) { // unlikely, but not impossible HInstruction* i = c->GetNext(); if (i != nullptr && i->IsIf() && i->InputAt(0) == c) { iset_->insert(c); |