[llvm] [AMDGPU] Add VDSDIR instructions for GFX12 (PR #75197)

Carl Ritson via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 22:57:09 PST 2023


================
@@ -74,22 +98,31 @@ class LDSDIR_getAsm<bit direct> {
   );
 }
 
-class LDSDIR_Real<bits<2> op, LDSDIR_Pseudo lds, int subtarget> :
-  LDSDIR_Common<lds.Mnemonic,
-                lds.Mnemonic # LDSDIR_getAsm<lds.is_direct>.ret,
-                lds.is_direct>,
-  SIMCInstr <lds.Mnemonic, subtarget>,
-  LDSDIRe<op, lds.is_direct> {
+class VDSDIR_getAsm<bit direct> {
+  string ret = !if(direct,
+    " $vdst$waitvdst$waitvsrc",
+    " $vdst, $attr$attrchan$waitvdst$waitvsrc"
+  );
+}
+
+class DSDIR_Real<DSDIR_Pseudo lds, dag ins, string asm, int subtarget> :
+  DSDIR_Common<lds.Mnemonic,
+               lds.Mnemonic # asm,
+               ins,
+               lds.is_direct>,
+  SIMCInstr <lds.Mnemonic, subtarget> {
   let isPseudo = 0;
   let isCodeGenOnly = 0;
 }
 
 //===----------------------------------------------------------------------===//
-// LDS Direct Instructions
+// LDS/DS Direct Instructions
----------------
perlfu wrote:

LDS/VDS

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


More information about the llvm-commits mailing list