Skip to content

Commit 2482d8f

Browse files
committed
for musttail, also use tail call code to forward arguments
1 parent 2936852 commit 2482d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelLoweringCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
22852285
if (ShadowReg)
22862286
RegsToPass.push_back(std::make_pair(ShadowReg, Arg));
22872287
}
2288-
} else if (!IsSibcall && (!isTailCall || isByVal)) {
2288+
} else if (!IsSibcall && (!isTailCall || (isByVal && !IsMustTail))) {
22892289
assert(VA.isMemLoc());
22902290
if (!StackPtr.getNode())
22912291
StackPtr = DAG.getCopyFromReg(Chain, dl, RegInfo->getStackRegister(),

0 commit comments

Comments
 (0)