[all-commits] [llvm/llvm-project] 5b7a7e: [NVPTX] Fix code generation for `trap-unreachable`...
Christian Sigg via All-commits
all-commits at lists.llvm.org
Sat Sep 30 22:59:38 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b7a7ec5a2106772de90a59c52e9fac7481f7e8a
https://github.com/llvm/llvm-project/commit/5b7a7ec5a2106772de90a59c52e9fac7481f7e8a
Author: Christian Sigg <chsigg at users.noreply.github.com>
Date: 2023-10-01 (Sun, 01 Oct 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/lib/Target/NVPTX/NVPTX.h
M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
M llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp
M llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
M llvm/test/CodeGen/NVPTX/unreachable.ll
Log Message:
-----------
[NVPTX] Fix code generation for `trap-unreachable`. (#67478)
https://reviews.llvm.org/D152789 added an `exit` op before each
`unreachable`. This means we never get to the `trap` instruction.
This change limits the insertion of `exit` instructions to the cases
where `unreachable` is not lowered to `trap`. Trap itself is changed to
be emitted as `trap; exit;` to convey to `ptxas` that it exits the CFG.
More information about the All-commits
mailing list