@@ -2318,12 +2318,13 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
2318
2318
// shuffling arguments passed in memory.
2319
2319
if (!IsSibcall && isTailCall) {
2320
2320
// Force all the incoming stack arguments to be loaded from the stack
2321
- // before any new outgoing arguments are stored to the stack, because the
2322
- // outgoing stack slots may alias the incoming argument stack slots, and
2323
- // the alias isn't otherwise explicit. This is slightly more conservative
2324
- // than necessary, because it means that each store effectively depends
2325
- // on every argument instead of just those arguments it would clobber.
2326
- SDValue ArgChain = DAG.getStackArgumentTokenFactor (Chain);
2321
+ // before any new outgoing arguments or the return address are stored to the
2322
+ // stack, because the outgoing stack slots may alias the incoming argument
2323
+ // stack slots, and the alias isn't otherwise explicit. This is slightly
2324
+ // more conservative than necessary, because it means that each store
2325
+ // effectively depends on every argument instead of just those arguments it
2326
+ // would clobber.
2327
+ Chain = DAG.getStackArgumentTokenFactor (Chain);
2327
2328
2328
2329
SmallVector<SDValue, 8 > MemOpChains2;
2329
2330
SDValue FIN;
@@ -2365,13 +2366,12 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
2365
2366
Source = DAG.getNode (ISD::ADD, dl, getPointerTy (DAG.getDataLayout ()),
2366
2367
StackPtr, Source);
2367
2368
2368
- MemOpChains2.push_back (CreateCopyOfByValArgument (Source, FIN,
2369
- ArgChain,
2370
- Flags, DAG, dl));
2369
+ MemOpChains2.push_back (
2370
+ CreateCopyOfByValArgument (Source, FIN, Chain, Flags, DAG, dl));
2371
2371
} else {
2372
2372
// Store relative to framepointer.
2373
2373
MemOpChains2.push_back (DAG.getStore (
2374
- ArgChain , dl, Arg, FIN,
2374
+ Chain , dl, Arg, FIN,
2375
2375
MachinePointerInfo::getFixedStack (DAG.getMachineFunction (), FI)));
2376
2376
}
2377
2377
}
0 commit comments