[llvm-commits] [llvm] r127359 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/byval-memcpy.ll test/CodeGen/X86/byval2.ll test/CodeGen/X86/byval3.ll test/CodeGen/X86/byval4.ll test/CodeGen/X86/byval5.ll test/CodeGen/X86/byval7.ll test/CodeGen/X86/tailcallbyval64.ll

Stuart Hastings stuart at apple.com
Wed Mar 9 13:10:30 PST 2011


Author: stuart
Date: Wed Mar  9 15:10:30 2011
New Revision: 127359

URL: http://llvm.org/viewvc/llvm-project?rev=127359&view=rev
Log:
X86 byval copies no longer always_inline.  <rdar://problem/8706628>

Added:
    llvm/trunk/test/CodeGen/X86/byval-memcpy.ll
Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
    llvm/trunk/test/CodeGen/X86/byval2.ll
    llvm/trunk/test/CodeGen/X86/byval3.ll
    llvm/trunk/test/CodeGen/X86/byval4.ll
    llvm/trunk/test/CodeGen/X86/byval5.ll
    llvm/trunk/test/CodeGen/X86/byval7.ll
    llvm/trunk/test/CodeGen/X86/tailcallbyval64.ll

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Mar  9 15:10:30 2011
@@ -1564,7 +1564,7 @@
   SDValue SizeNode = DAG.getConstant(Flags.getByValSize(), MVT::i32);
 
   return DAG.getMemcpy(Chain, dl, Dst, Src, SizeNode, Flags.getByValAlign(),
-                       /*isVolatile*/false, /*AlwaysInline=*/true,
+                       /*isVolatile*/false, /*AlwaysInline=*/false,
                        MachinePointerInfo(), MachinePointerInfo());
 }
 

Added: llvm/trunk/test/CodeGen/X86/byval-memcpy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/byval-memcpy.ll?rev=127359&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/byval-memcpy.ll (added)
+++ llvm/trunk/test/CodeGen/X86/byval-memcpy.ll Wed Mar  9 15:10:30 2011
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+; RUN: llc < %s -march=x86 | FileCheck %s
+; CHECK: _memcpy
+define void @foo([40000 x i32] *%P) nounwind {
+  call void @bar([40000 x i32] * byval align 1 %P)
+  ret void
+}
+
+declare void @bar([40000 x i32] *%P )
+    

Modified: llvm/trunk/test/CodeGen/X86/byval2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/byval2.ll?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/byval2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/byval2.ll Wed Mar  9 15:10:30 2011
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86    | grep rep.movsl | count 2
+; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
+; RUN: llc < %s -march=x86    | egrep {rep.movsl|memcpy} | count 2
 
 %struct.s = type { i64, i64, i64, i64, i64, i64, i64, i64,
                    i64, i64, i64, i64, i64, i64, i64, i64,

Modified: llvm/trunk/test/CodeGen/X86/byval3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/byval3.ll?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/byval3.ll (original)
+++ llvm/trunk/test/CodeGen/X86/byval3.ll Wed Mar  9 15:10:30 2011
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
+; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
+; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy} | count 2
 
 %struct.s = type { i32, i32, i32, i32, i32, i32, i32, i32,
                    i32, i32, i32, i32, i32, i32, i32, i32,

Modified: llvm/trunk/test/CodeGen/X86/byval4.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/byval4.ll?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/byval4.ll (original)
+++ llvm/trunk/test/CodeGen/X86/byval4.ll Wed Mar  9 15:10:30 2011
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl	 | count 2
+; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
+; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy}	 | count 2
 
 %struct.s = type { i16, i16, i16, i16, i16, i16, i16, i16,
                    i16, i16, i16, i16, i16, i16, i16, i16,

Modified: llvm/trunk/test/CodeGen/X86/byval5.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/byval5.ll?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/byval5.ll (original)
+++ llvm/trunk/test/CodeGen/X86/byval5.ll Wed Mar  9 15:10:30 2011
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
-; RUN: llc < %s -march=x86 | grep rep.movsl	 | count 2
+; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
+; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy}	 | count 2
 
 %struct.s = type { i8, i8, i8, i8, i8, i8, i8, i8,
                    i8, i8, i8, i8, i8, i8, i8, i8,

Modified: llvm/trunk/test/CodeGen/X86/byval7.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/byval7.ll?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/byval7.ll (original)
+++ llvm/trunk/test/CodeGen/X86/byval7.ll Wed Mar  9 15:10:30 2011
@@ -8,10 +8,8 @@
 entry:
 ; CHECK: main:
 ; CHECK: movl $1, (%esp)
-; CHECK: leal 16(%esp), %edi
-; CHECK: movl $36, %ecx
-; CHECK: leal 160(%esp), %esi
-; CHECK: rep;movsl
+; CHECK: movl ${{36|144}},
+; CHECK: {{rep;movsl|memcpy}}
 	%s = alloca %struct.S		; <%struct.S*> [#uses=2]
 	%tmp15 = getelementptr %struct.S* %s, i32 0, i32 0		; <<2 x i64>*> [#uses=1]
 	store <2 x i64> < i64 8589934595, i64 1 >, <2 x i64>* %tmp15, align 16

Modified: llvm/trunk/test/CodeGen/X86/tailcallbyval64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcallbyval64.ll?rev=127359&r1=127358&r2=127359&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/tailcallbyval64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/tailcallbyval64.ll Wed Mar  9 15:10:30 2011
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86-64  -tailcallopt  | grep TAILCALL
 ; Expect 2 rep;movs because of tail call byval lowering.
-; RUN: llc < %s -march=x86-64  -tailcallopt  | grep rep | wc -l | grep 2
+; RUN: llc < %s -march=x86-64  -tailcallopt  | egrep {rep|memcpy} | wc -l | grep 2
 ; A sequence of copyto/copyfrom virtual registers is used to deal with byval
 ; lowering appearing after moving arguments to registers. The following two
 ; checks verify that the register allocator changes those sequences to direct





More information about the llvm-commits mailing list