[llvm] [NVPTX] Respect FTZ flag when lowering atomicrmw fadd. (PR #200732)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 22:46:09 PDT 2026


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 origin/main HEAD --extensions cpp -- llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
index f6768c9f3..1936de244 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
@@ -7508,8 +7508,8 @@ NVPTXTargetLowering::shouldExpandAtomicRMWInIR(const AtomicRMWInst *AI) const {
         return AtomicExpansionKind::None;
     }
 
-    if (Ty->isHalfTy() && (!FTZ || UnsafeFPAtomics) && STI.getSmVersion() >= 70 &&
-        STI.getPTXVersion() >= 63)
+    if (Ty->isHalfTy() && (!FTZ || UnsafeFPAtomics) &&
+        STI.getSmVersion() >= 70 && STI.getPTXVersion() >= 63)
       return AtomicExpansionKind::None;
 
     if (Ty->isBFloatTy() && STI.getSmVersion() >= 90 &&

``````````

</details>


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


More information about the llvm-commits mailing list