[clang] [llvm] [AMDGPU] Add target intrinsic for s_buffer_prefetch_data (PR #107293)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 5 22:16:36 PDT 2024
================
@@ -9934,6 +9934,12 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
auto NewMI = DAG.getMachineNode(Opc, DL, Op->getVTList(), Ops);
return SDValue(NewMI, 0);
}
+ case Intrinsic::amdgcn_s_prefetch_data: {
+ // For non-global address space preserve the chain and remove the call.
+ if (!AMDGPU::isFlatGlobalAddrSpace(cast<MemSDNode>(Op)->getAddressSpace()))
+ return Op.getOperand(0);
+ return Op;
----------------
arsenm wrote:
I'd expect the private/local cases to be an error. Also collectFlatAddressOperands should handle this, to get the flat->global optimization in InferAddressSpaces
https://github.com/llvm/llvm-project/pull/107293
More information about the cfe-commits
mailing list