llvm.org GIT mirror llvm / 03d5826
Revert 127359; it broke lencod. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127382 91177308-0d34-0410-b5e6-96231b3b80d8 Stuart Hastings 8 years ago
8 changed file(s) with 14 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
15631563 SDValue SizeNode = DAG.getConstant(Flags.getByValSize(), MVT::i32);
15641564
15651565 return DAG.getMemcpy(Chain, dl, Dst, Src, SizeNode, Flags.getByValAlign(),
1566 /*isVolatile*/false, /*AlwaysInline=*/false,
1566 /*isVolatile*/false, /*AlwaysInline=*/true,
15671567 MachinePointerInfo(), MachinePointerInfo());
15681568 }
15691569
+0
-10
test/CodeGen/X86/byval-memcpy.ll less more
None ; RUN: llc < %s -march=x86-64 | FileCheck %s
1 ; RUN: llc < %s -march=x86 | FileCheck %s
2 ; CHECK: memcpy
3 define void @foo([40000 x i32] *%P) nounwind {
4 call void @bar([40000 x i32] * byval align 1 %P)
5 ret void
6 }
7
8 declare void @bar([40000 x i32] *%P )
9
None ; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
1 ; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy} | count 2
0 ; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
1 ; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
22
33 %struct.s = type { i64, i64, i64, i64, i64, i64, i64, i64,
44 i64, i64, i64, i64, i64, i64, i64, i64,
None ; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
1 ; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy} | count 2
0 ; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
1 ; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
22
33 %struct.s = type { i32, i32, i32, i32, i32, i32, i32, i32,
44 i32, i32, i32, i32, i32, i32, i32, i32,
None ; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
1 ; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy} | count 2
0 ; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
1 ; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
22
33 %struct.s = type { i16, i16, i16, i16, i16, i16, i16, i16,
44 i16, i16, i16, i16, i16, i16, i16, i16,
None ; RUN: llc < %s -march=x86-64 | egrep {rep.movsq|memcpy} | count 2
1 ; RUN: llc < %s -march=x86 | egrep {rep.movsl|memcpy} | count 2
0 ; RUN: llc < %s -march=x86-64 | grep rep.movsq | count 2
1 ; RUN: llc < %s -march=x86 | grep rep.movsl | count 2
22
33 %struct.s = type { i8, i8, i8, i8, i8, i8, i8, i8,
44 i8, i8, i8, i8, i8, i8, i8, i8,
77 entry:
88 ; CHECK: main:
99 ; CHECK: movl $1, (%esp)
10 ; CHECK: movl ${{36|144}},
11 ; CHECK: {{rep;movsl|memcpy}}
10 ; CHECK: leal 16(%esp), %edi
11 ; CHECK: movl $36, %ecx
12 ; CHECK: leal 160(%esp), %esi
13 ; CHECK: rep;movsl
1214 %s = alloca %struct.S ; <%struct.S*> [#uses=2]
1315 %tmp15 = getelementptr %struct.S* %s, i32 0, i32 0 ; <<2 x i64>*> [#uses=1]
1416 store <2 x i64> < i64 8589934595, i64 1 >, <2 x i64>* %tmp15, align 16
0 ; RUN: llc < %s -march=x86-64 -tailcallopt | grep TAILCALL
11 ; Expect 2 rep;movs because of tail call byval lowering.
2 ; RUN: llc < %s -march=x86-64 -tailcallopt | egrep {rep|memcpy} | wc -l | grep 2
2 ; RUN: llc < %s -march=x86-64 -tailcallopt | grep rep | wc -l | grep 2
33 ; A sequence of copyto/copyfrom virtual registers is used to deal with byval
44 ; lowering appearing after moving arguments to registers. The following two
55 ; checks verify that the register allocator changes those sequences to direct