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 57374e4 commit cbfe326Copy full SHA for cbfe326
include/swift/SILOptimizer/Utils/StackNesting.h
@@ -160,7 +160,11 @@ class StackNesting {
160
/// Returns the stack allocation instruction for a stack deallocation
161
/// instruction.
162
SILInstruction *getAllocForDealloc(SILInstruction *Dealloc) const {
163
- return Dealloc->getOperand(0)->getDefiningInstruction();
+ SILValue op = Dealloc->getOperand(0);
164
+ while (auto *mvi = dyn_cast<MoveValueInst>(op)) {
165
+ op = mvi->getOperand();
166
+ }
167
+ return op->getDefiningInstruction();
168
}
169
170
/// Insert deallocations at block boundaries.
0 commit comments