[llvm] [NVPTX] Fix code generation for `trap-unreachable`. (PR #67478)
Christian Sigg via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 23:47:18 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));
----------------
chsigg wrote:
The functionality of the new code is the same, it's just much easier to read.
https://github.com/llvm/llvm-project/pull/67478
More information about the llvm-commits
mailing list