[PATCH] D130761: [AMDGPU][MC] Verify selection of LDS MUBUF opcodes

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 07:07:20 PDT 2022


dp added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:4495-4498
+  if (Enc == SIInstrFlags::FLAT && isGFX940())
+    return true;
+  if (Enc == SIInstrFlags::MUBUF && isGFX11Plus())
     return true;
----------------
foad wrote:
> dp wrote:
> > foad wrote:
> > > What do these lines achieve?
> > These lines exclude checks for cases when there are separate DMA opcodes. In these cases, incorrect opcode selection is not possible.
> > 
> > GFX940 FLAT opcodes do not support `lds` modifier, but there are separate DMA opcodes `global_load_lds_dword`, etc.
> > 
> > Likewise, GFX11 has `buffer_load_lds_b32`, etc; MUBUF `lds` modifier is not supported.
> > 
> OK. I thought those cases would be handled correctly anyway, because we would return true on line 4505, but maybe I am wrong.
You are right, the check for MUBUF is optional, but GFX940 FLAT LDS opcodes have VALU=1.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130761/new/

https://reviews.llvm.org/D130761



More information about the llvm-commits mailing list