OSDN Git Service

Fix bce gtest.
authorMingyao Yang <mingyao@google.com>
Wed, 4 Mar 2015 20:10:34 +0000 (12:10 -0800)
committerMingyao Yang <mingyao@google.com>
Wed, 4 Mar 2015 20:10:34 +0000 (12:10 -0800)
Change-Id: I8b974b68bbebef704fa3c8a073f2920f8a78d1fa

compiler/optimizing/bounds_check_elimination_test.cc

index a298413..24fa583 100644 (file)
@@ -43,6 +43,7 @@ TEST(BoundsCheckEliminationTest, NarrowingRangeArrayBoundsElimination) {
   ArenaAllocator allocator(&pool);
 
   HGraph* graph = new (&allocator) HGraph(&allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -148,6 +149,7 @@ TEST(BoundsCheckEliminationTest, OverflowArrayBoundsElimination) {
   ArenaAllocator allocator(&pool);
 
   HGraph* graph = new (&allocator) HGraph(&allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -221,6 +223,7 @@ TEST(BoundsCheckEliminationTest, UnderflowArrayBoundsElimination) {
   ArenaAllocator allocator(&pool);
 
   HGraph* graph = new (&allocator) HGraph(&allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -294,6 +297,7 @@ TEST(BoundsCheckEliminationTest, ConstantArrayBoundsElimination) {
   ArenaAllocator allocator(&pool);
 
   HGraph* graph = new (&allocator) HGraph(&allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -369,6 +373,7 @@ static HGraph* BuildSSAGraph1(ArenaAllocator* allocator,
                               int increment,
                               IfCondition cond = kCondGE) {
   HGraph* graph = new (allocator) HGraph(allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -507,6 +512,7 @@ static HGraph* BuildSSAGraph2(ArenaAllocator* allocator,
                               int increment = -1,
                               IfCondition cond = kCondLE) {
   HGraph* graph = new (allocator) HGraph(allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -640,6 +646,7 @@ static HGraph* BuildSSAGraph3(ArenaAllocator* allocator,
                               int increment,
                               IfCondition cond) {
   HGraph* graph = new (allocator) HGraph(allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -752,6 +759,7 @@ static HGraph* BuildSSAGraph4(ArenaAllocator* allocator,
                               int initial,
                               IfCondition cond = kCondGE) {
   HGraph* graph = new (allocator) HGraph(allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (allocator) HBasicBlock(graph);
   graph->AddBlock(entry);
@@ -879,6 +887,7 @@ TEST(BoundsCheckEliminationTest, BubbleSortArrayBoundsElimination) {
   ArenaAllocator allocator(&pool);
 
   HGraph* graph = new (&allocator) HGraph(&allocator);
+  graph->SetHasArrayAccesses(true);
 
   HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
   graph->AddBlock(entry);