Skip to content

Commit 4ba9826

Browse files
committed
added back isInstructionTriviallyDead check
1 parent f9eedaa commit 4ba9826

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/NVPTX/NVVMReflect.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ void NVVMReflect::replaceReflectCalls(
235235
if (auto *UI = dyn_cast<Instruction>(U))
236236
Worklist.push_back(UI);
237237
I->replaceAllUsesWith(C);
238-
I->eraseFromParent();
238+
if (isInstructionTriviallyDead(I))
239+
I->eraseFromParent();
239240
};
240241

241242
for (auto &[Call, NewValue] : ReflectReplacements)

0 commit comments

Comments
 (0)