mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[region-isolation] Fix crash due to missing visitVectorBaseAddrInst case
Credit to https://github.com/stzn for initial work on the patch. rdar://151401230
This commit is contained in:
@@ -141,7 +141,16 @@ struct AddressBaseComputingVisitor
|
||||
return SILValue();
|
||||
}
|
||||
|
||||
SILValue visitNonAccess(SILValue) { return SILValue(); }
|
||||
SILValue visitNonAccess(SILValue value) {
|
||||
// For now since it is late in 6.2, work around vector base addr not being
|
||||
// treated as a projection.
|
||||
if (auto *v = dyn_cast<VectorBaseAddrInst>(value)) {
|
||||
isProjectedFromAggregate = true;
|
||||
return v->getOperand();
|
||||
}
|
||||
|
||||
return SILValue();
|
||||
}
|
||||
|
||||
SILValue visitPhi(SILPhiArgument *phi) {
|
||||
llvm_unreachable("Should never hit this");
|
||||
@@ -312,6 +321,7 @@ static bool isStaticallyLookThroughInst(SILInstruction *inst) {
|
||||
case SILInstructionKind::UncheckedEnumDataInst:
|
||||
case SILInstructionKind::StructElementAddrInst:
|
||||
case SILInstructionKind::TupleElementAddrInst:
|
||||
case SILInstructionKind::VectorBaseAddrInst:
|
||||
return true;
|
||||
case SILInstructionKind::MoveValueInst:
|
||||
// Look through if it isn't from a var decl.
|
||||
|
||||
Reference in New Issue
Block a user