[llvm-branch-commits] [llvm] [AMDGPU] Add support for sub-dword types for address space 13 (PR #213223)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Nov 2 17:02:42 PST 2026
================
@@ -5498,6 +5505,22 @@ bool SIInstrInfo::verifyInstruction(const MachineInstr &MI,
return false;
}
+ // Lowering relies on exactly one memory operand, since a sub-dword store
+ // synthesizes a load operand from it, and on the index carrying no
+ // subregister, since the custom inserter rewrites it in place to M0.
+ if (auto *LdStIdx = dyn_cast<AMDGPUMI::VLoadStoreIdxInst>(&MI)) {
+ if (MI.getNumMemOperands() != 1) {
+ ErrInfo = "v_load/store_idx should have exactly one memory operand.";
+ return false;
+ }
+
+ const MachineOperand &IdxOp = LdStIdx->getIdxOp();
+ if (IdxOp.isReg() && IdxOp.getSubReg() != 0) {
+ ErrInfo = "v_load/store_idx register index must not have a subregister.";
+ return false;
+ }
----------------
arsenm wrote:
This isn't a valid rule to enforce. The operand / register class compatibility APIs won't be aware of it
https://github.com/llvm/llvm-project/pull/213223
More information about the llvm-branch-commits
mailing list