Skip to content

Commit 9fe248e

Browse files
authored
Fix deprecation warning in AMDGPUConditionalDiscard. NFC. (llvm#1158)
1 parent 6d5a6da commit 9fe248e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUConditionalDiscard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void AMDGPUConditionalDiscard::optimizeBlock(BasicBlock &BB, bool ConvertToDemot
176176
auto *NewKill = cast<CallInst>(KillCand->clone());
177177

178178
NewKill->setArgOperand(0, Cond);
179-
NewKill->insertBefore(PredBranchInst);
179+
NewKill->insertBefore(PredBranchInst->getIterator());
180180

181181
if (ConvertToDemote) {
182182
NewKill->setCalledFunction(Intrinsic::getOrInsertDeclaration(

0 commit comments

Comments
 (0)