[llvm] AMDGPU: Add codegen for atomicrmw operations usub_cond and usub_sat (PR #141068)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 01:26:47 PDT 2025


================
@@ -18452,6 +18462,22 @@ SITargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const {
   case AtomicRMWInst::Add:
     // PCIe supports add and xchg for system atomics.
     return atomicSupportedIfLegalIntType(RMW);
+  case AtomicRMWInst::USubCond:
+    if (Subtarget->hasCondSubInsts()) {
----------------
arsenm wrote:

This should follow all the system scope logic as the other case. Probably should move this up with the UIncWrap cases, it just needs the additional legal instruction check 

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


More information about the llvm-commits mailing list