[llvm] [NVPTX] Add Bulk Copy Prefetch Intrinsics (PR #123226)
Durgadoss R via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 11:15:49 PST 2025
================
@@ -3105,6 +3105,30 @@ void NVPTXDAGToDAGISel::SelectCpAsyncBulkG2S(SDNode *N) {
ReplaceNode(N, CurDAG->getMachineNode(Opcode, DL, N->getVTList(), Ops));
}
+void NVPTXDAGToDAGISel::SelectCpAsyncBulkPrefetchL2(SDNode *N) {
+ // We have {Chain, Intrinsic-ID} followed by the actual intrisic args:
+ // src, size, cache_hint, cache_hint_flag
+ // NumOperands = {Chain, IID} + {Actual intrinsic args}
+ // = {2} + {4}
+ size_t NumOps = N->getNumOperands();
+ bool IsCacheHint = N->getConstantOperandVal(NumOps - 1) == 1;
+ size_t NumArgs = IsCacheHint ? 3 : 2; // src, size, cache_hint
+
+ SDLoc DL(N);
+ SmallVector<SDValue, 8> Ops(N->ops().slice(2, NumArgs));
+ Ops.push_back(N->getOperand(0)); // Chain operand
+ //if (IsCacheHint) {
+ // Ops.push_back(N->getOperand(2));
+ //}
+
----------------
durga4github wrote:
Please remove these commented out lines: 3120 to 3122
https://github.com/llvm/llvm-project/pull/123226
More information about the llvm-commits
mailing list