1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux -mattr=-avx | FileCheck %s -check-prefix=X64
3 ; Win64 has not supported byval yet.
4 ; RUN: llc < %s -mtriple=i686-- -mattr=-avx | FileCheck %s -check-prefix=X32
6 %struct.s = type { i64, i64, i64, i64, i64, i64, i64, i64,
7 i64, i64, i64, i64, i64, i64, i64, i64,
10 define void @g(i64 %a, i64 %b, i64 %c) nounwind {
12 ; X64: # %bb.0: # %entry
13 ; X64-NEXT: pushq %rbx
14 ; X64-NEXT: subq $288, %rsp # imm = 0x120
15 ; X64-NEXT: movq %rdi, {{[0-9]+}}(%rsp)
16 ; X64-NEXT: movq %rsi, {{[0-9]+}}(%rsp)
17 ; X64-NEXT: movq %rdx, {{[0-9]+}}(%rsp)
18 ; X64-NEXT: leaq {{[0-9]+}}(%rsp), %rbx
19 ; X64-NEXT: movl $17, %ecx
20 ; X64-NEXT: movq %rsp, %rdi
21 ; X64-NEXT: movq %rbx, %rsi
22 ; X64-NEXT: rep;movsq (%rsi), %es:(%rdi)
24 ; X64-NEXT: movl $17, %ecx
25 ; X64-NEXT: movq %rsp, %rdi
26 ; X64-NEXT: movq %rbx, %rsi
27 ; X64-NEXT: rep;movsq (%rsi), %es:(%rdi)
29 ; X64-NEXT: addq $288, %rsp # imm = 0x120
34 ; X32: # %bb.0: # %entry
35 ; X32-NEXT: pushl %ebp
36 ; X32-NEXT: movl %esp, %ebp
37 ; X32-NEXT: pushl %ebx
38 ; X32-NEXT: pushl %edi
39 ; X32-NEXT: pushl %esi
40 ; X32-NEXT: andl $-16, %esp
41 ; X32-NEXT: subl $288, %esp # imm = 0x120
42 ; X32-NEXT: movl 12(%ebp), %eax
43 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
44 ; X32-NEXT: movl 8(%ebp), %eax
45 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
46 ; X32-NEXT: movl 20(%ebp), %eax
47 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
48 ; X32-NEXT: movl 16(%ebp), %eax
49 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
50 ; X32-NEXT: movl 28(%ebp), %eax
51 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
52 ; X32-NEXT: movl 24(%ebp), %eax
53 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
54 ; X32-NEXT: leal {{[0-9]+}}(%esp), %ebx
55 ; X32-NEXT: movl $34, %ecx
56 ; X32-NEXT: movl %esp, %edi
57 ; X32-NEXT: movl %ebx, %esi
58 ; X32-NEXT: rep;movsl (%esi), %es:(%edi)
60 ; X32-NEXT: movl $34, %ecx
61 ; X32-NEXT: movl %esp, %edi
62 ; X32-NEXT: movl %ebx, %esi
63 ; X32-NEXT: rep;movsl (%esi), %es:(%edi)
65 ; X32-NEXT: leal -12(%ebp), %esp
72 %d = alloca %struct.s, align 16
73 %tmp = getelementptr %struct.s, %struct.s* %d, i32 0, i32 0
74 store i64 %a, i64* %tmp, align 16
75 %tmp2 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 1
76 store i64 %b, i64* %tmp2, align 16
77 %tmp4 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 2
78 store i64 %c, i64* %tmp4, align 16
79 call void @f( %struct.s* byval %d )
80 call void @f( %struct.s* byval %d )
84 declare void @f(%struct.s* byval)