diff options
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 897d8b7015..c9609e0bda 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -124,12 +124,9 @@ void HGraphBuilder::MaybeAddExtraGotoBlocks() { if (NeedsExtraGotoBlock(predecessor)) { HBasicBlock* new_goto = graph_->SplitEdgeAndUpdateRPO(predecessor, exit); new_goto->AddInstruction(new (graph_->GetAllocator()) HGoto(predecessor->GetDexPc())); - - // No need to update loop info of the new block. - DCHECK(!predecessor->IsInLoop()) - << " we should only add the extra Goto blocks for Return/ReturnVoid->TryBoundary->Exit " - << "chains. In those chains, the TryBoundary of kind:exit should never be a part of a " - << "loop"; + if (predecessor->IsInLoop()) { + new_goto->SetLoopInformation(predecessor->GetLoopInformation()); + } // Update domination chain if (!predecessor->GetDominatedBlocks().empty()) { |