[clang] [llvm] [AMDGPU] Expand `av` built-ins and intrinsics to b8/b16/b32/b64 (PR #229429)
Pierre van Houtryve via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 4 00:28:37 PST 2026
================
@@ -1869,13 +1869,22 @@ void SITargetLowering::getTgtMemIntrinsic(SmallVectorImpl<IntrinsicInfo> &Infos,
Infos.push_back(Info);
return;
}
+ case Intrinsic::amdgcn_av_load_b8:
+ case Intrinsic::amdgcn_av_load_b16:
+ case Intrinsic::amdgcn_av_load_b32:
+ case Intrinsic::amdgcn_av_load_b64:
case Intrinsic::amdgcn_av_load_b128:
+ case Intrinsic::amdgcn_av_store_b8:
+ case Intrinsic::amdgcn_av_store_b16:
+ case Intrinsic::amdgcn_av_store_b32:
+ case Intrinsic::amdgcn_av_store_b64:
case Intrinsic::amdgcn_av_store_b128: {
- bool IsStore = IntrID == Intrinsic::amdgcn_av_store_b128;
+ bool IsStore = CI.getType()->isVoidTy();
+ Type *DataTy = IsStore ? CI.getArgOperand(1)->getType() : CI.getType();
Info.opc = IsStore ? ISD::INTRINSIC_VOID : ISD::INTRINSIC_W_CHAIN;
- Info.memVT = MVT::v4i32;
+ Info.memVT = MVT::getVT(DataTy);
Info.ptrVal = CI.getArgOperand(0);
- Info.align = Align(16);
+ Info.align = Align(Info.memVT.getStoreSize());
----------------
Pierre-vh wrote:
Good point, I updated the docs
https://github.com/llvm/llvm-project/pull/229429
More information about the cfe-commits
mailing list