summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/register_allocator_test.cc
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2015-04-17 18:19:30 +0100
committerDavid Brazdil <dbrazdil@google.com>2015-04-17 18:20:46 +0100
commitf4eb9ae9436d72d1406286528331a52c1b3afa1d (patch)
treefebb69106adc5625e11e71c88aa8ee6fbe5412d7 /compiler/optimizing/register_allocator_test.cc
parent41de22394e0108f6216a56193b579a199fc37649 (diff)
downloadart-f4eb9ae9436d72d1406286528331a52c1b3afa1d.tar.gz
art-f4eb9ae9436d72d1406286528331a52c1b3afa1d.tar.bz2
art-f4eb9ae9436d72d1406286528331a52c1b3afa1d.zip
ART: Fix a failing gtest
Stricter assumptions about the state of linear scan caused a reg alloc gtest to fail. Change-Id: I0c568bf996ce6adefe4f000524b38acd3967421e
Diffstat (limited to 'compiler/optimizing/register_allocator_test.cc')
-rw-r--r--compiler/optimizing/register_allocator_test.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/optimizing/register_allocator_test.cc b/compiler/optimizing/register_allocator_test.cc
index c307d98555..182cd0e833 100644
--- a/compiler/optimizing/register_allocator_test.cc
+++ b/compiler/optimizing/register_allocator_test.cc
@@ -433,18 +433,15 @@ TEST(RegisterAllocatorTest, FreeUntil) {
// Add three temps holding the same register, and starting at different positions.
// Put the one that should be picked in the middle of the inactive list to ensure
// we do not depend on an order.
- LiveInterval* interval = LiveInterval::MakeInterval(&allocator, Primitive::kPrimInt);
- interval->SetRegister(0);
+ LiveInterval* interval = LiveInterval::MakeFixedInterval(&allocator, 0, Primitive::kPrimInt);
interval->AddRange(40, 50);
register_allocator.inactive_.Add(interval);
- interval = LiveInterval::MakeInterval(&allocator, Primitive::kPrimInt);
- interval->SetRegister(0);
+ interval = LiveInterval::MakeFixedInterval(&allocator, 0, Primitive::kPrimInt);
interval->AddRange(20, 30);
register_allocator.inactive_.Add(interval);
- interval = LiveInterval::MakeInterval(&allocator, Primitive::kPrimInt);
- interval->SetRegister(0);
+ interval = LiveInterval::MakeFixedInterval(&allocator, 0, Primitive::kPrimInt);
interval->AddRange(60, 70);
register_allocator.inactive_.Add(interval);