[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:40:23 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:
The isFloatTy is not dead code, but it triggers a behavior change in umin/umax/smin/smax, so I'll fix this separately
https://github.com/llvm/llvm-project/pull/95590
More information about the llvm-commits
mailing list