[llvm] AMDGPU: Simplify DS atomicrmw fadd handling (PR #89468)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 19 15:48:39 PDT 2024
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 f433c3b38005701fdc219ae8c01e6af1b8bedba9 93186007dfd527c98047831777160f4634c67d7d -- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp llvm/lib/Target/AMDGPU/GCNSubtarget.h llvm/lib/Target/AMDGPU/SIISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 9f766fda65..12b7f05c44 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -16051,8 +16051,8 @@ SITargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
// TODO: Handle REGION_ADDRESS
if (AS == AMDGPUAS::LOCAL_ADDRESS) {
- // DS F32 FP atomics do respect the denormal mode, but the rounding mode is
- // fixed to round-to-nearest-even.
+ // DS F32 FP atomics do respect the denormal mode, but the rounding mode
+ // is fixed to round-to-nearest-even.
//
// F64 / PK_F16 / PK_BF16 never flush and are also fixed to
// round-to-nearest-even.
@@ -16067,8 +16067,8 @@ SITargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
if (Ty->isDoubleTy()) {
// Ignores denormal mode, but we don't consider flushing mandatory.
- return Subtarget->hasLDSFPAtomicAddF64() ?
- AtomicExpansionKind::None : AtomicExpansionKind::CmpXChg;
+ return Subtarget->hasLDSFPAtomicAddF64() ? AtomicExpansionKind::None
+ : AtomicExpansionKind::CmpXChg;
}
// TODO: Handle v2f16/v2bf16 cases for gfx940
``````````
</details>
https://github.com/llvm/llvm-project/pull/89468
More information about the llvm-commits
mailing list