Skip to content

Commit fc37ed2

Browse files
committed
SILOptimizer: Teach visitAccessedAddress() about pack instructions
1 parent aa1aad1 commit fc37ed2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SIL/Utils/MemAccessUtils.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2638,6 +2638,7 @@ void swift::visitAccessedAddress(SILInstruction *I,
26382638
#include "swift/AST/ReferenceStorage.def"
26392639
case SILInstructionKind::StoreInst:
26402640
case SILInstructionKind::StoreBorrowInst:
2641+
case SILInstructionKind::PackElementSetInst:
26412642
visitor(&I->getAllOperands()[StoreInst::Dest]);
26422643
return;
26432644

@@ -2655,7 +2656,8 @@ void swift::visitAccessedAddress(SILInstruction *I,
26552656
case SILInstructionKind::OpenExistentialAddrInst:
26562657
case SILInstructionKind::SwitchEnumAddrInst:
26572658
case SILInstructionKind::UncheckedTakeEnumDataAddrInst:
2658-
case SILInstructionKind::UnconditionalCheckedCastInst: {
2659+
case SILInstructionKind::UnconditionalCheckedCastInst:
2660+
case SILInstructionKind::PackElementGetInst: {
26592661
// Assuming all the above have only a single address operand.
26602662
assert(I->getNumOperands() - I->getNumTypeDependentOperands() == 1);
26612663
Operand *singleOperand = &I->getAllOperands()[0];

0 commit comments

Comments
 (0)