diff options
author | Vladimir Marko <vmarko@google.com> | 2015-06-08 16:39:02 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-06-09 10:08:31 +0100 |
commit | 21cb657159b3e93cc888685ade83f8fc519290be (patch) | |
tree | 8e9c076c09a6bdd94feeac299f9c891b2c902562 /compiler/dex/mir_optimization.cc | |
parent | ffd42ee5b4eb7de14b7d6b253655a9d231eb1271 (diff) | |
download | art-21cb657159b3e93cc888685ade83f8fc519290be.tar.gz art-21cb657159b3e93cc888685ade83f8fc519290be.tar.bz2 art-21cb657159b3e93cc888685ade83f8fc519290be.zip |
Quick: Fix LoopRepeatingTopologicalSortIterator.
Always push the loop head on the loop head stack. This fixes
a bug where we failed to return to an unnatural loop head to
recalculate its GVN data.
Bug: 17410955
(cherry picked from commit 67c8c942e9dfcabd548351db75e6d3b8b5165afa)
Change-Id: I44b9a17cbcd7307d1cc70ac564b99e29803723c5
Diffstat (limited to 'compiler/dex/mir_optimization.cc')
-rw-r--r-- | compiler/dex/mir_optimization.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index 7b1ec398d..645511ed9 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -1790,7 +1790,8 @@ bool MIRGraph::EliminateSuspendChecks(BasicBlock* bb) { pred_mask_union |= pred_mask; } } - DCHECK_EQ(((1u << (IsLoopHead(bb->id) ? bb->nesting_depth - 1u: bb->nesting_depth)) - 1u), + // DCHECK_EQ() may not hold for unnatural loop heads, so use DCHECK_GE(). + DCHECK_GE(((1u << (IsLoopHead(bb->id) ? bb->nesting_depth - 1u: bb->nesting_depth)) - 1u), pred_mask_union); suspend_checks_in_loops &= pred_mask_union; } |