[llvm-branch-commits] [llvm] AMDGPU: Handle legal v2bf16 atomicrmw fadd for gfx12 (PR #95930)

Jay Foad via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 19 03:34:38 PDT 2024


================
@@ -1735,8 +1737,11 @@ defm : SIBufferAtomicPat<"SIbuffer_atomic_dec", i64, "BUFFER_ATOMIC_DEC_X2">;
 let OtherPredicates = [HasAtomicCSubNoRtnInsts] in
 defm : SIBufferAtomicPat<"SIbuffer_atomic_csub", i32, "BUFFER_ATOMIC_CSUB", ["noret"]>;
 
-let SubtargetPredicate = isGFX12Plus in {
+let SubtargetPredicate = HasAtomicBufferPkAddBF16Inst in {
   defm : SIBufferAtomicPat_Common<"SIbuffer_atomic_fadd", v2bf16, "BUFFER_ATOMIC_PK_ADD_BF16_VBUFFER">;
----------------
jayfoad wrote:

VBUFFER is a new encoding in GFX12 which replaces the old MTBUF and MUBUF encodings. We have different pseudos for VBUFFER (which should only be selected on GFX12+) and MTBUF/MUBUF (which should only be selected pre-GFX12).

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


More information about the llvm-branch-commits mailing list