diff options
author | 2014-06-10 08:26:04 +0000 | |
---|---|---|
committer | 2014-06-10 08:26:05 +0000 | |
commit | 7eb3fa1e03b070c55ecbc814e2e3ae4409cf7b1e (patch) | |
tree | f99de08579ded31a1d5bb24d65ee35d712b6070d /compiler/optimizing/ssa_test.cc | |
parent | fd755e0034373eea3c4c420a870f6f6bbf729734 (diff) | |
parent | 184d640d2a3ac86d871dab58386a50cc9bb973f9 (diff) |
Merge "Add a type propagation phase after building SSA."
Diffstat (limited to 'compiler/optimizing/ssa_test.cc')
-rw-r--r-- | compiler/optimizing/ssa_test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc index 3b354f19d9..088a5c4240 100644 --- a/compiler/optimizing/ssa_test.cc +++ b/compiler/optimizing/ssa_test.cc @@ -87,6 +87,13 @@ static void TestCode(const uint16_t* data, const char* expected) { graph->TransformToSSA(); ReNumberInstructions(graph); + // Test that phis had their type set. + for (size_t i = 0, e = graph->GetBlocks().Size(); i < e; ++i) { + for (HInstructionIterator it(graph->GetBlocks().Get(i)->GetPhis()); !it.Done(); it.Advance()) { + ASSERT_NE(it.Current()->GetType(), Primitive::kPrimVoid); + } + } + SsaPrettyPrinter printer(graph); printer.VisitInsertionOrder(); |