[llvm] [AMDGPU] Ensure positive InstOffset for buffer operations (PR #145504)

Aleksandar Spasojevic via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 24 06:15:33 PDT 2025


================
@@ -803,6 +803,21 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
     }
   }
 
+  // Validate buffer offset for GFX12+ - must be positive
+  if ((MCII->get(MI.getOpcode()).TSFlags &
+       (SIInstrFlags::MTBUF | SIInstrFlags::MUBUF)) &&
+      AMDGPU::isGFX12Plus(STI)) {
----------------
aleksandar-amd wrote:

But this check is only required for GFX12+ as the task specifies 

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


More information about the llvm-commits mailing list