diff options
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 0876ce070e..c99cfab05f 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -688,7 +688,7 @@ void HGraph::TransformLoopToSinglePreheaderFormat(HBasicBlock* header) { 0, header_phi->GetType()); if (header_phi->GetType() == DataType::Type::kReference) { - preheader_phi->SetReferenceTypeInfo(header_phi->GetReferenceTypeInfo()); + preheader_phi->SetReferenceTypeInfoIfValid(header_phi->GetReferenceTypeInfo()); } preheader->AddPhi(preheader_phi); @@ -3215,6 +3215,12 @@ void HInstruction::SetReferenceTypeInfo(ReferenceTypeInfo rti) { SetPackedFlag<kFlagReferenceTypeIsExact>(rti.IsExact()); } +void HInstruction::SetReferenceTypeInfoIfValid(ReferenceTypeInfo rti) { + if (rti.IsValid()) { + SetReferenceTypeInfo(rti); + } +} + bool HBoundType::InstructionDataEquals(const HInstruction* other) const { const HBoundType* other_bt = other->AsBoundType(); ScopedObjectAccess soa(Thread::Current()); |