[llvm] AMDGPU: Support local atomicrmw fmin/fmax for float/double (PR #95590)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 09:35:11 PDT 2024


================
@@ -16042,7 +16027,15 @@ SITargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
     return AtomicExpansionKind::CmpXChg;
   }
   case AtomicRMWInst::FMin:
-  case AtomicRMWInst::FMax:
+  case AtomicRMWInst::FMax: {
+    Type *Ty = RMW->getType();
+
+    // LDS float and double fmin/fmax were always supported.
+    if (AS == AMDGPUAS::LOCAL_ADDRESS && (Ty->isFloatTy() || Ty->isDoubleTy()))
+      return AtomicExpansionKind::None;
----------------
arsenm wrote:

> would be handling the no-fine-grained-remote-memory case, not denormal mishandling

Which don't matter for LDS 



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


More information about the llvm-commits mailing list