We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fad765b commit a55a3eaCopy full SHA for a55a3ea
SwiftCompilerSources/Sources/Optimizer/Utilities/OptUtils.swift
@@ -308,6 +308,10 @@ extension Instruction {
308
// Don't remove UncheckedEnumDataInst in OSSA in case it is responsible
309
// for consuming an enum value.
310
return !parentFunction.hasOwnership
311
+ case is ExtendLifetimeInst:
312
+ // An extend_lifetime can only be removed if the operand is also removed.
313
+ // If its operand is trivial, it will be removed by MandatorySimplification.
314
+ return false
315
default:
316
break
317
}
0 commit comments