Skip to content

Commit 1c67e1e

Browse files
committed
Use emitDestroyValueOperation instead of createStrongRelease
1 parent b5fab61 commit 1c67e1e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,17 +335,15 @@ bool PartialApplyCombiner::processSingleApply(FullApplySite AI) {
335335
Builder.emitDestroyValueOperation(PAI->getLoc(), Arg);
336336
}
337337
if (!PAI->hasCalleeGuaranteedContext())
338-
Builder.createStrongRelease(AI.getLoc(), PAI,
339-
Builder.getDefaultAtomicity());
338+
Builder.emitDestroyValueOperation(PAI->getLoc(), PAI);
340339
Builder.setInsertionPoint(AI.getInstruction());
341340
} else {
342341
// Release the non-consumed parameters.
343342
for (auto Arg : ToBeReleasedArgs) {
344343
Builder.emitDestroyValueOperation(PAI->getLoc(), Arg);
345344
}
346345
if (!PAI->hasCalleeGuaranteedContext())
347-
Builder.createStrongRelease(AI.getLoc(), PAI,
348-
Builder.getDefaultAtomicity());
346+
Builder.emitDestroyValueOperation(PAI->getLoc(), PAI);
349347
}
350348

351349
if (auto apply = dyn_cast<ApplyInst>(AI))

0 commit comments

Comments
 (0)