[llvm] [NVPTX] Fix code generation for `trap-unreachable`. (PR #67478)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 10:29:46 PDT 2023


================
@@ -3226,14 +3226,9 @@ void SelectionDAGBuilder::visitUnreachable(const UnreachableInst &I) {
 
   // We may be able to ignore unreachable behind a noreturn call.
   if (DAG.getTarget().Options.NoTrapAfterNoreturn) {
-    const BasicBlock &BB = *I.getParent();
-    if (&I != &BB.front()) {
-      BasicBlock::const_iterator PredI =
-        std::prev(BasicBlock::const_iterator(&I));
----------------
Artem-B wrote:

What was the purpose of the removed code?  Was it removed intentionally?

https://github.com/llvm/llvm-project/pull/67478


More information about the llvm-commits mailing list