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

Johannes Doerfert llvmlistbot at llvm.org
Fri Apr 25 08:48:38 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);
----------------
jdoerfert wrote:

We should make it work for the tools. Triple implies DL, otherwise it cannot work and we just "work around" some irrelevant configuration.

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


More information about the Mlir-commits mailing list