diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp index 28534a28383..1d30608d34c 100644 --- a/lib/Target/X86/X86ISelPattern.cpp +++ b/lib/Target/X86/X86ISelPattern.cpp @@ -3764,8 +3764,10 @@ static SDOperand GetAdjustedArgumentStores(SDOperand Chain, int Offset, MVT::ValueType StoreVT; switch (Chain.getOpcode()) { case ISD::CALLSEQ_START: - // If we found the start of the call sequence, we're done. - return Chain; + // If we found the start of the call sequence, we're done. We actually + // strip off the CALLSEQ_START node, to avoid generating the + // ADJCALLSTACKDOWN marker for the tail call. + return Chain.getOperand(0); case ISD::TokenFactor: { std::vector Ops; Ops.reserve(Chain.getNumOperands());