Index: test/cctest/compiler/test-scheduler.cc |
diff --git a/test/cctest/compiler/test-scheduler.cc b/test/cctest/compiler/test-scheduler.cc |
index 0ade4d15ed1a6aa31083009d42676865ba280616..3a0103d8ac7749fe70e9364fb402e627007c859d 100644 |
--- a/test/cctest/compiler/test-scheduler.cc |
+++ b/test/cctest/compiler/test-scheduler.cc |
@@ -30,7 +30,7 @@ static void CheckRPONumbers(BasicBlockVector* order, size_t expected, |
for (int i = 0; i < static_cast<int>(order->size()); i++) { |
CHECK(order->at(i)->rpo_number() == i); |
if (!loops_allowed) { |
- CHECK_LT(order->at(i)->loop_end(), 0); |
+ CHECK_EQ(NULL, order->at(i)->loop_end()); |
CHECK_EQ(NULL, order->at(i)->loop_header()); |
} |
} |
@@ -40,19 +40,21 @@ static void CheckRPONumbers(BasicBlockVector* order, size_t expected, |
static void CheckLoop(BasicBlockVector* order, BasicBlock** blocks, |
int body_size) { |
BasicBlock* header = blocks[0]; |
- CHECK_GT(header->loop_end(), 0); |
- CHECK_EQ(body_size, (header->loop_end() - header->rpo_number())); |
+ BasicBlock* end = header->loop_end(); |
+ CHECK_NE(NULL, end); |
+ CHECK_GT(end->rpo_number(), 0); |
+ CHECK_EQ(body_size, end->rpo_number() - header->rpo_number()); |
for (int i = 0; i < body_size; i++) { |
- int num = blocks[i]->rpo_number(); |
- CHECK(num >= header->rpo_number() && num < header->loop_end()); |
+ CHECK_GE(blocks[i]->rpo_number(), header->rpo_number()); |
+ CHECK_LT(blocks[i]->rpo_number(), end->rpo_number()); |
CHECK(header->LoopContains(blocks[i])); |
CHECK(header->IsLoopHeader() || blocks[i]->loop_header() == header); |
} |
if (header->rpo_number() > 0) { |
CHECK_NE(order->at(header->rpo_number() - 1)->loop_header(), header); |
} |
- if (header->loop_end() < static_cast<int>(order->size())) { |
- CHECK_NE(order->at(header->loop_end())->loop_header(), header); |
+ if (end->rpo_number() < static_cast<int>(order->size())) { |
+ CHECK_NE(order->at(end->rpo_number())->loop_header(), header); |
} |
} |