[llvm] [NVPTX] Fix code generation for `trap-unreachable`. (PR #67478)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 09:00:38 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff a904bb464fe46052803e49b99ec255d2078c3c3b f0e772fe2cb2ff2c587803d5d091c7db6bdf8af5 -- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/Target/NVPTX/NVPTX.h llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index ba0ab3586f75..c5fd56795a52 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -3227,8 +3227,8 @@ void SelectionDAGBuilder::visitUnreachable(const UnreachableInst &I) {
// We may be able to ignore unreachable behind a noreturn call.
if (DAG.getTarget().Options.NoTrapAfterNoreturn) {
if (const CallInst *Call = dyn_cast_or_null<CallInst>(I.getPrevNode())) {
- if (Call->doesNotReturn())
- return;
+ if (Call->doesNotReturn())
+ return;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/67478
More information about the llvm-commits
mailing list