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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 04:32:49 PDT 2025


================
@@ -4392,6 +4392,11 @@ void Verifier::visitAllocaInst(AllocaInst &AI) {
     verifySwiftErrorValue(&AI);
   }
 
+  if (TT.isAMDGPU()) {
+    Check(AI.getAddressSpace() == DL.getAllocaAddrSpace(),
----------------
arsenm wrote:

If we support the 0 case, we should still probably try to filter the unreasonable address spaces. only 0 and 5 would be legitimate 

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


More information about the llvm-commits mailing list