From 4f1a384762bf49fe8f3ecae8dd2bcb0e19d044a9 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 12 Mar 2015 10:34:11 +0000 Subject: Give an expected type to phis created for multiple returns. When inlining, we used to take the type of the inlined method for the phi in case of multiple returns. I recently changed the logic of phi types to only be of int/float/double/ref, so we need to call ToPhiType when creating the phi. Change-Id: I960067ca8a8814509c2a7c52c08387d892ebf4a3 --- compiler/optimizing/nodes.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index e51bbc330a..a6adcca490 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -907,7 +907,8 @@ void HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { } else { if (!returns_void) { // There will be multiple returns. - return_value = new (allocator) HPhi(allocator, kNoRegNumber, 0, invoke->GetType()); + return_value = new (allocator) HPhi( + allocator, kNoRegNumber, 0, HPhi::ToPhiType(invoke->GetType())); to->AddPhi(return_value->AsPhi()); } for (size_t i = 0, e = to->GetPredecessors().Size(); i < e; ++i) { -- cgit v1.2.3-59-g8ed1b