Update tailcall code to include inline attribute operand for memcpy. 

llvm-svn: 43978
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 8c40b3c..d51c1d9 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -1643,9 +1643,10 @@
  
         SDOperand AlignNode = DAG.getConstant(Align, MVT::i32);
         SDOperand  SizeNode = DAG.getConstant(Size, MVT::i32);
-        // Copy relative to framepointer.
-        MemOpChains2.push_back(DAG.getNode(ISD::MEMCPY, MVT::Other, Chain, FIN,
-                                           PtrOff, SizeNode, AlignNode));
+        SDOperand AlwaysInline = DAG.getConstant(1, MVT::i1);
+
+        MemOpChains2.push_back(DAG.getMemcpy(Chain, FIN, PtrOff, SizeNode, 
+                                             AlignNode,AlwaysInline));
       } else {
         SDOperand LoadedArg = DAG.getLoad(VA.getValVT(), Chain, PtrOff, NULL,0);
         // Store relative to framepointer.
diff --git a/llvm/test/CodeGen/X86/tailcallbyval.ll b/llvm/test/CodeGen/X86/tailcallbyval.ll
new file mode 100644
index 0000000..dc1dea7
--- /dev/null
+++ b/llvm/test/CodeGen/X86/tailcallbyval.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llc -march=x86 -tailcallopt | grep TAILCALL
+%struct.s = type { i32, i32, i32 }
+
+define  fastcc i32 @tailcallee(%struct.s* byval %a) {
+entry:
+        %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0
+        %tmp3 = load i32* %tmp2
+        ret i32 %tmp3
+}
+
+define  fastcc i32 @tailcaller(%struct.s* byval %a) {
+entry:
+        %tmp4 = tail call fastcc i32 @tailcallee(%struct.s* %a byval)
+        ret i32 %tmp4
+}