Skip to content

Commit f55e57c

Browse files
committed
[Coroutines][NFC] Only look for Alloca or Load when finding dbg.declare for temp spills
We only look for Alloca or Load in this case, so making it explicit. Reviewed By: ChuanqiXu, MatzeB Differential Revision: https://reviews.llvm.org/D157423
1 parent 876a480 commit f55e57c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Coroutines/CoroFrame.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,6 +1865,8 @@ static void insertSpills(const FrameDataInfo &FrameData, coro::Shape &Shape) {
18651865
if (LdInst->getPointerOperandType() != LdInst->getType())
18661866
break;
18671867
CurDef = LdInst->getPointerOperand();
1868+
if (!isa<AllocaInst, LoadInst>(CurDef))
1869+
break;
18681870
DIs = FindDbgDeclareUses(CurDef);
18691871
}
18701872
}

0 commit comments

Comments
 (0)