summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2015-03-05 15:57:42 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-05 15:57:43 +0000
commita80aab6dab72c5614b723c6690af8c79e3dcce60 (patch)
tree224b4ba87f27dfca80d119e84b5ffd2866097657
parentea19b3696f90e07c72acb383f84305ace9b16097 (diff)
parentdf45205204125727fa71b17b3f6bb3d8eb9bc20c (diff)
downloadart-a80aab6dab72c5614b723c6690af8c79e3dcce60.zip
art-a80aab6dab72c5614b723c6690af8c79e3dcce60.tar.gz
art-a80aab6dab72c5614b723c6690af8c79e3dcce60.tar.bz2
Merge "ART: Fix test breakage"
-rw-r--r--compiler/optimizing/register_allocator.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc
index 0e9c4d6..748ab22 100644
--- a/compiler/optimizing/register_allocator.cc
+++ b/compiler/optimizing/register_allocator.cc
@@ -1425,13 +1425,13 @@ void RegisterAllocator::ConnectSiblings(LiveInterval* interval) {
// At each safepoint, we record stack and register information.
// We iterate backwards to test safepoints in ascending order of positions,
// which is what LiveInterval::Covers is optimized for.
- while (safepoint_index > 0) {
- HInstruction* safepoint = safepoints_.Get(--safepoint_index);
+ for (; safepoint_index > 0; --safepoint_index) {
+ HInstruction* safepoint = safepoints_.Get(safepoint_index - 1);
size_t position = safepoint->GetLifetimePosition();
// Test that safepoints are ordered in the optimal way.
- DCHECK(safepoint_index == 0
- || safepoints_.Get(safepoint_index - 1)->GetLifetimePosition() >= position);
+ DCHECK(safepoint_index == safepoints_.Size()
+ || safepoints_.Get(safepoint_index)->GetLifetimePosition() <= position);
if (current->IsDeadAt(position)) {
break;