[llvm] [AMDGPU] Add make.buffer.rsrc to InferAddressSpaces (PR #140770)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 10:54:28 PDT 2025
================
@@ -1124,6 +1125,16 @@ Value *GCNTTIImpl::rewriteIntrinsicWithAddressSpace(IntrinsicInst *II,
II->setCalledFunction(NewDecl);
return II;
}
+ case Intrinsic::amdgcn_make_buffer_rsrc: {
+ Type *SrcTy = NewV->getType();
+ Type *DstTy = II->getType();
+ Module *M = II->getModule();
+ Function *NewDecl = Intrinsic::getOrInsertDeclaration(
+ M, II->getIntrinsicID(), {DstTy, SrcTy});
+ II->setArgOperand(0, NewV);
+ II->setCalledFunction(NewDecl);
----------------
arsenm wrote:
Not sure this readjusts the call's type correctly but I guess it must work
https://github.com/llvm/llvm-project/pull/140770
More information about the llvm-commits
mailing list