[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 06:06:26 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:
Should be dead code, but in principle the unsafe handling would be handling the no-fine-grained-remote-memory case, not denormal mishandling 
https://github.com/llvm/llvm-project/pull/95590
    
    
More information about the llvm-commits
mailing list