summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-03-10 18:59:31 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-03-10 18:59:31 +0000
commit3afca781086699e60a8941fb9474d4607c5909cb (patch)
treeea9e1c3b0dbb2180b6c4971d93849aeb265c23b1
parent21c7906e08b801f1afcb62bdd1f1763c93e5ea06 (diff)
downloadart-3afca781086699e60a8941fb9474d4607c5909cb.zip
art-3afca781086699e60a8941fb9474d4607c5909cb.tar.gz
art-3afca781086699e60a8941fb9474d4607c5909cb.tar.bz2
Fix tests now that the SSA builder is pruning more phis.
Change-Id: I503400e7343322e31ad393d51367b404d6ed7bd8
-rw-r--r--compiler/optimizing/liveness_test.cc56
-rw-r--r--compiler/optimizing/ssa_test.cc19
2 files changed, 37 insertions, 38 deletions
diff --git a/compiler/optimizing/liveness_test.cc b/compiler/optimizing/liveness_test.cc
index 907eff1..0b0cfde 100644
--- a/compiler/optimizing/liveness_test.cc
+++ b/compiler/optimizing/liveness_test.cc
@@ -388,44 +388,44 @@ TEST(LivenessTest, Loop5) {
// Make sure we create a preheader of a loop when a header originally has two
// incoming blocks and one back edge.
// Bitsets are made of:
- // (constant0, constant4, constant5, phi in block 8, phi in block 4)
+ // (constant0, constant4, constant5, phi in block 8)
const char* expected =
"Block 0\n"
- " live in: (00000)\n"
- " live out: (11100)\n"
- " kill: (11100)\n"
+ " live in: (0000)\n"
+ " live out: (1110)\n"
+ " kill: (1110)\n"
"Block 1\n"
- " live in: (11100)\n"
- " live out: (01100)\n"
- " kill: (00000)\n"
+ " live in: (1110)\n"
+ " live out: (0110)\n"
+ " kill: (0000)\n"
"Block 2\n"
- " live in: (01000)\n"
- " live out: (00000)\n"
- " kill: (00000)\n"
+ " live in: (0100)\n"
+ " live out: (0000)\n"
+ " kill: (0000)\n"
"Block 3\n"
- " live in: (00100)\n"
- " live out: (00000)\n"
- " kill: (00000)\n"
+ " live in: (0010)\n"
+ " live out: (0000)\n"
+ " kill: (0000)\n"
"Block 4\n" // loop header
- " live in: (00000)\n"
- " live out: (00001)\n"
- " kill: (00001)\n"
+ " live in: (0001)\n"
+ " live out: (0001)\n"
+ " kill: (0000)\n"
"Block 5\n" // back edge
- " live in: (00001)\n"
- " live out: (00000)\n"
- " kill: (00000)\n"
+ " live in: (0001)\n"
+ " live out: (0001)\n"
+ " kill: (0000)\n"
"Block 6\n" // return block
- " live in: (00001)\n"
- " live out: (00000)\n"
- " kill: (00000)\n"
+ " live in: (0001)\n"
+ " live out: (0000)\n"
+ " kill: (0000)\n"
"Block 7\n" // exit block
- " live in: (00000)\n"
- " live out: (00000)\n"
- " kill: (00000)\n"
+ " live in: (0000)\n"
+ " live out: (0000)\n"
+ " kill: (0000)\n"
"Block 8\n" // synthesized pre header
- " live in: (00000)\n"
- " live out: (00000)\n"
- " kill: (00010)\n";
+ " live in: (0000)\n"
+ " live out: (0001)\n"
+ " kill: (0001)\n";
const uint16_t data[] = ONE_REGISTER_CODE_ITEM(
Instruction::CONST_4 | 0 | 0,
diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc
index a05b38c..00c241b 100644
--- a/compiler/optimizing/ssa_test.cc
+++ b/compiler/optimizing/ssa_test.cc
@@ -332,8 +332,8 @@ TEST(SsaTest, Loop5) {
const char* expected =
"BasicBlock 0, succ: 1\n"
" 0: IntConstant 0 [4, 4]\n"
- " 1: IntConstant 4 [14]\n"
- " 2: IntConstant 5 [14]\n"
+ " 1: IntConstant 4 [13]\n"
+ " 2: IntConstant 5 [13]\n"
" 3: Goto\n"
"BasicBlock 1, pred: 0, succ: 3, 2\n"
" 4: Equal(0, 0) [5]\n"
@@ -343,18 +343,17 @@ TEST(SsaTest, Loop5) {
"BasicBlock 3, pred: 1, succ: 8\n"
" 7: Goto\n"
"BasicBlock 4, pred: 8, 5, succ: 6, 5\n"
- " 8: Phi(14, 8) [8, 12, 9, 9]\n"
- " 9: Equal(8, 8) [10]\n"
- " 10: If(9)\n"
+ " 8: Equal(13, 13) [9]\n"
+ " 9: If(8)\n"
"BasicBlock 5, pred: 4, succ: 4\n"
- " 11: Goto\n"
+ " 10: Goto\n"
"BasicBlock 6, pred: 4, succ: 7\n"
- " 12: Return(8)\n"
+ " 11: Return(13)\n"
"BasicBlock 7, pred: 6\n"
- " 13: Exit\n"
+ " 12: Exit\n"
"BasicBlock 8, pred: 2, 3, succ: 4\n"
- " 14: Phi(1, 2) [8]\n"
- " 15: Goto\n";
+ " 13: Phi(1, 2) [8, 8, 11]\n"
+ " 14: Goto\n";
const uint16_t data[] = ONE_REGISTER_CODE_ITEM(
Instruction::CONST_4 | 0 | 0,