From 3159674c0863f53cfbc1913d493550221ac47f02 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 24 Nov 2014 15:28:45 +0000 Subject: Fix a bug in the type analysis phase of optimizing. Dex code can lead to the creation of a phi with one float input and one integer input. Since the SSA builder trusts the verifier, it assumes that the integer input must be converted to float. However, when the register is not used afterwards, the verifier hasn't ensured that. Therefore, the compiler must remove the phi prior to doing type propagation. Change-Id: Idcd51c4dccce827c59d1f2b253bc1c919bc07df5 --- compiler/optimizing/optimization.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/optimization.cc') diff --git a/compiler/optimizing/optimization.cc b/compiler/optimizing/optimization.cc index d1178d5798..b99f6784f7 100644 --- a/compiler/optimizing/optimization.cc +++ b/compiler/optimizing/optimization.cc @@ -27,13 +27,15 @@ void HOptimization::Check() { SSAChecker checker(graph_->GetArena(), graph_); checker.Run(); if (!checker.IsValid()) { - LOG(FATAL) << Dumpable(checker); + LOG(FATAL) << "Error after " << GetPassName() << ": " + << Dumpable(checker); } } else { GraphChecker checker(graph_->GetArena(), graph_); checker.Run(); if (!checker.IsValid()) { - LOG(FATAL) << Dumpable(checker); + LOG(FATAL) << "Error after " << GetPassName() << ": " + << Dumpable(checker); } } } -- cgit v1.2.3-59-g8ed1b