[llvm] [AMDGPU] Tail call support for whole wave functions (PR #145860)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 08:36:10 PDT 2025
================
@@ -7977,13 +7977,18 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
}
case Intrinsic::amdgcn_call_whole_wave: {
TargetLowering::ArgListTy Args;
+ bool isTailCall = I.isTailCall();
// The first argument is the callee. Skip it when assembling the call args.
TargetLowering::ArgListEntry Arg;
for (unsigned Idx = 1; Idx < I.arg_size(); ++Idx) {
Arg.Node = getValue(I.getArgOperand(Idx));
Arg.Ty = I.getArgOperand(Idx)->getType();
Arg.setAttributes(&I, Idx);
+
+ if (Arg.IsSRet && isa<Instruction>(I.getArgOperand(Idx)))
+ isTailCall = false;
+
----------------
arsenm wrote:
Isn't that the whole point of the tail marker?
https://github.com/llvm/llvm-project/pull/145860
More information about the llvm-commits
mailing list