diff options
| author | 2015-07-23 16:53:02 +0000 | |
|---|---|---|
| committer | 2015-07-23 16:53:02 +0000 | |
| commit | f7efc9ef90c38212f8c4fbece99080f784a53181 (patch) | |
| tree | 69543b9e11746fe1e390651a972c1045864ad549 /compiler/dex/mir_optimization_test.cc | |
| parent | bea4eb4b29aa1030aa1919dfedaa95aea2599b7a (diff) | |
| parent | d29e8487ff1774b6eb5f0e18d854415c1ee8f6b0 (diff) | |
Merge "ART: Fix Quick/Optimizing suspend check assumption mismatch."
Diffstat (limited to 'compiler/dex/mir_optimization_test.cc')
| -rw-r--r-- | compiler/dex/mir_optimization_test.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/dex/mir_optimization_test.cc b/compiler/dex/mir_optimization_test.cc index 10a4337cf5..47123ba28c 100644 --- a/compiler/dex/mir_optimization_test.cc +++ b/compiler/dex/mir_optimization_test.cc @@ -467,8 +467,17 @@ class SuspendCheckEliminationTest : public MirOptimizationTest { cu_.mir_graph->ComputeDominators(); cu_.mir_graph->ComputeTopologicalSortOrder(); cu_.mir_graph->SSATransformationEnd(); + bool gate_result = cu_.mir_graph->EliminateSuspendChecksGate(); - ASSERT_TRUE(gate_result); + ASSERT_NE(gate_result, kLeafOptimization); + if (kLeafOptimization) { + // Even with kLeafOptimization on and Gate() refusing to allow SCE, we want + // to run the SCE test to avoid bitrot, so we need to initialize explicitly. + cu_.mir_graph->suspend_checks_in_loops_ = + cu_.mir_graph->arena_->AllocArray<uint32_t>(cu_.mir_graph->GetNumBlocks(), + kArenaAllocMisc); + } + TopologicalSortIterator iterator(cu_.mir_graph.get()); bool change = false; for (BasicBlock* bb = iterator.Next(change); bb != nullptr; bb = iterator.Next(change)) { |