diff options
author | 2015-03-12 10:34:11 +0000 | |
---|---|---|
committer | 2015-03-12 10:57:47 +0000 | |
commit | 4f1a384762bf49fe8f3ecae8dd2bcb0e19d044a9 (patch) | |
tree | 3cb359f31e1f3080fb7cfffd5a6fd417f61753d7 /compiler/optimizing | |
parent | d304629202eec2ab053a47fc7bcf10223b5ccea4 (diff) |
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
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/nodes.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |