[Mlir-commits] [llvm] [mlir] [AMDGPU][Verifier] Check address space of `alloca` instruction (PR #135820)

Matt Arsenault llvmlistbot at llvm.org
Fri Apr 25 14:16:26 PDT 2025


================
@@ -4395,6 +4395,11 @@ void Verifier::visitAllocaInst(AllocaInst &AI) {
     verifySwiftErrorValue(&AI);
   }
 
+  if (TT.isAMDGPU()) {
+    Check(AI.getAddressSpace() == AMDGPUAS::PRIVATE_ADDRESS,
+          "alloca on amdgpu must be in addrspace(5)", &AI);
----------------
arsenm wrote:

-1 to making this a list in the DL. It's overly limiting and it's a lot of work for something we do not care about at all. KISS and just check == 5 for AMDGPU 

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


More information about the Mlir-commits mailing list