Skip to content

Commit f217fc9

Browse files
committed
Fix isTriviallyDuplicatable to handle open_pack_element
SILInstruction::clone doesn't know how to clone instructions that produce the archetype uuid. SILCloner is equipped to handle such instructions. Optimizations like LoopRotate use SILInstruction::clone and will be incorrect for such instructions. rdar://130047619
1 parent e4566c8 commit f217fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SIL/IR/SILInstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ bool SILInstruction::isTriviallyDuplicatable() const {
14191419
if (isa<OpenExistentialAddrInst>(this) || isa<OpenExistentialRefInst>(this) ||
14201420
isa<OpenExistentialMetatypeInst>(this) ||
14211421
isa<OpenExistentialValueInst>(this) || isa<OpenExistentialBoxInst>(this) ||
1422-
isa<OpenExistentialBoxValueInst>(this)) {
1422+
isa<OpenExistentialBoxValueInst>(this) || isa<OpenPackElementInst>(this)) {
14231423
// Don't know how to duplicate these properly yet. Inst.clone() per
14241424
// instruction does not work. Because the follow-up instructions need to
14251425
// reuse the same archetype uuid which would only work if we used a

0 commit comments

Comments
 (0)