[clang] [llvm] [AMDGPU] Add initial support for VGPR as memory (PR #205435)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 07:46:59 PDT 2026
================
@@ -1779,6 +1780,17 @@ bool hasValueInRangeLikeMetadata(const MDNode &MD, int64_t Val) {
return false;
}
+AllocatedVGPRsMetadata AllocatedVGPRsMetadata::get(const AllocaInst &Alloca) {
+ const MDNode *MD = Alloca.getMetadata("amdgpu.allocated.vgprs");
+ assert(MD && MD->getNumOperands() == 2 &&
+ "expected !amdgpu.allocated.vgprs metadata with 2 operands");
----------------
arsenm wrote:
IR structural rules should be enforced by the verifier
https://github.com/llvm/llvm-project/pull/205435
More information about the llvm-commits
mailing list