summaryrefslogtreecommitdiff
path: root/compiler/optimizing/constant_folding_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2015-10-08 15:47:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-10-08 15:47:08 +0000
commit359f77c44dafef7ebed027180422ee75eef1467c (patch)
treeb4b7fd4f8bf646dcd106351aaf2f5c1e6d719911 /compiler/optimizing/constant_folding_test.cc
parent64d8d93aa9359b1126513dba92e27dbe184bfe3a (diff)
parentec7802a102d49ab5c17495118d4fe0bcc7287beb (diff)
Merge "Add DCHECKs to ArenaVector and ScopedArenaVector."
Diffstat (limited to 'compiler/optimizing/constant_folding_test.cc')
-rw-r--r--compiler/optimizing/constant_folding_test.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/optimizing/constant_folding_test.cc b/compiler/optimizing/constant_folding_test.cc
index 10e4bc98a6..694f7687ba 100644
--- a/compiler/optimizing/constant_folding_test.cc
+++ b/compiler/optimizing/constant_folding_test.cc
@@ -113,7 +113,7 @@ TEST(ConstantFolding, IntConstantFoldingNegation) {
// Check the value of the computed constant.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsIntConstant());
ASSERT_EQ(inst->AsIntConstant()->GetValue(), -1);
};
@@ -175,7 +175,7 @@ TEST(ConstantFolding, LongConstantFoldingNegation) {
// Check the value of the computed constant.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsLongConstant());
ASSERT_EQ(inst->AsLongConstant()->GetValue(), INT64_C(-4294967296));
};
@@ -237,7 +237,7 @@ TEST(ConstantFolding, IntConstantFoldingOnAddition1) {
// Check the value of the computed constant.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsIntConstant());
ASSERT_EQ(inst->AsIntConstant()->GetValue(), 3);
};
@@ -317,7 +317,7 @@ TEST(ConstantFolding, IntConstantFoldingOnAddition2) {
// Check the values of the computed constants.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst1 = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst1 = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst1->IsIntConstant());
ASSERT_EQ(inst1->AsIntConstant()->GetValue(), 12);
HInstruction* inst2 = inst1->GetPrevious();
@@ -389,7 +389,7 @@ TEST(ConstantFolding, IntConstantFoldingOnSubtraction) {
// Check the value of the computed constant.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsIntConstant());
ASSERT_EQ(inst->AsIntConstant()->GetValue(), 1);
};
@@ -453,7 +453,7 @@ TEST(ConstantFolding, LongConstantFoldingOnAddition) {
// Check the value of the computed constant.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsLongConstant());
ASSERT_EQ(inst->AsLongConstant()->GetValue(), 3);
};
@@ -518,7 +518,7 @@ TEST(ConstantFolding, LongConstantFoldingOnSubtraction) {
// Check the value of the computed constant.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsLongConstant());
ASSERT_EQ(inst->AsLongConstant()->GetValue(), 1);
};
@@ -620,7 +620,7 @@ TEST(ConstantFolding, IntConstantFoldingAndJumps) {
// Check the values of the computed constants.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst1 = graph->GetBlock(4)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst1 = graph->GetBlocks()[4]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst1->IsIntConstant());
ASSERT_EQ(inst1->AsIntConstant()->GetValue(), 20);
HInstruction* inst2 = inst1->GetPrevious();
@@ -710,7 +710,7 @@ TEST(ConstantFolding, ConstantCondition) {
// Check the values of the computed constants.
auto check_after_cf = [](HGraph* graph) {
- HInstruction* inst = graph->GetBlock(1)->GetFirstInstruction()->InputAt(0);
+ HInstruction* inst = graph->GetBlocks()[1]->GetFirstInstruction()->InputAt(0);
ASSERT_TRUE(inst->IsIntConstant());
ASSERT_EQ(inst->AsIntConstant()->GetValue(), 1);
};