[Mlir-commits] [llvm] [mlir] [AMDGPU][Verifier] Check address space of `alloca` instruction (PR #135820)
Nikita Popov
llvmlistbot at llvm.org
Fri Apr 25 08:07: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);
----------------
nikic wrote:
I think llc and opt do default to the correct data layout based on triple nowadays, but it's possible llvm-as doesn't do this, as a low level tool.
https://github.com/llvm/llvm-project/pull/135820
More information about the Mlir-commits
mailing list