Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2023-08-07 19:14:54 -07:00
3 changed files with 42 additions and 0 deletions

View File

@@ -1342,6 +1342,12 @@ bool SILInstruction::mayRequirePackMetadata() const {
if (isDeallocatingStack())
return false;
// Terminators that exit the function must not result in pack metadata
// materialization.
auto *ti = dyn_cast<TermInst>(this);
if (ti && ti->isFunctionExiting())
return false;
// Check results and operands for packs. If a pack appears, lowering the
// instruction might result in pack metadata emission.
for (auto result : getResults()) {