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

via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 07:52:51 PDT 2025


================
@@ -1089,7 +1089,34 @@ multiclass DSAtomicRetNoRetPat_mc<DS_Pseudo inst, DS_Pseudo noRetInst,
   }
 }
 
+multiclass DSAtomicRetNoRetPatCondSub_mc<DS_Pseudo inst, DS_Pseudo noRetInst,
+                                         ValueType vt, string frag> {
+  let OtherPredicates = [LDSRequiresM0Init] in {
+    def : DSAtomicRetPat<inst, vt,
+                         !cast<PatFrag>(frag#"_local_m0_"#vt)>;
+    let OtherPredicates = [HasAtomicCSubNoRtnInsts] in
----------------
anjenner wrote:

There doesn't seem to be a corresponding predicate for cond_sub - presumably because it's supported the nortn form from the start? In which case, it seems like just removing the predicate from these defs is the right fix, as I've done in my latest commit.

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


More information about the llvm-commits mailing list