[Mlir-commits] [llvm] [mlir] [AMDGPU][Verifier] Check address space of `alloca` instruction (PR #135820)
Shilei Tian
llvmlistbot at llvm.org
Fri Apr 25 08:54:29 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);
----------------
shiltian 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.
Yes, `llvm-as` does not. In the previous version where I used DL, I did have to add a `A5` data layout to the test case of the command line.
https://github.com/llvm/llvm-project/pull/135820
More information about the Mlir-commits
mailing list