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 { i32, i32, i32, i32, i32, i32, i32, i32,
7 i32, i32, i32, i32, i32, i32, i32, i32,
8 i32, i32, i32, i32, i32, i32, i32, i32,
9 i32, i32, i32, i32, i32, i32, i32, i32,
12 define void @g(i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6) nounwind {
14 ; X64: # %bb.0: # %entry
15 ; X64-NEXT: pushq %rbx
16 ; X64-NEXT: subq $288, %rsp # imm = 0x120
17 ; X64-NEXT: movl %edi, {{[0-9]+}}(%rsp)
18 ; X64-NEXT: movl %esi, {{[0-9]+}}(%rsp)
19 ; X64-NEXT: movl %edx, {{[0-9]+}}(%rsp)
20 ; X64-NEXT: movl %ecx, {{[0-9]+}}(%rsp)
21 ; X64-NEXT: movl %r8d, {{[0-9]+}}(%rsp)
22 ; X64-NEXT: movl %r9d, {{[0-9]+}}(%rsp)
23 ; X64-NEXT: leaq {{[0-9]+}}(%rsp), %rbx
24 ; X64-NEXT: movl $16, %ecx
25 ; X64-NEXT: movq %rsp, %rdi
26 ; X64-NEXT: movq %rbx, %rsi
27 ; X64-NEXT: rep;movsq (%rsi), %es:(%rdi)
28 ; X64-NEXT: movl {{[0-9]+}}(%rsp), %eax
29 ; X64-NEXT: movl %eax, {{[0-9]+}}(%rsp)
31 ; X64-NEXT: movl $16, %ecx
32 ; X64-NEXT: movq %rsp, %rdi
33 ; X64-NEXT: movq %rbx, %rsi
34 ; X64-NEXT: rep;movsq (%rsi), %es:(%rdi)
35 ; X64-NEXT: movl {{[0-9]+}}(%rsp), %eax
36 ; X64-NEXT: movl %eax, {{[0-9]+}}(%rsp)
38 ; X64-NEXT: addq $288, %rsp # imm = 0x120
43 ; X32: # %bb.0: # %entry
44 ; X32-NEXT: pushl %ebp
45 ; X32-NEXT: movl %esp, %ebp
46 ; X32-NEXT: pushl %ebx
47 ; X32-NEXT: pushl %edi
48 ; X32-NEXT: pushl %esi
49 ; X32-NEXT: andl $-16, %esp
50 ; X32-NEXT: subl $288, %esp # imm = 0x120
51 ; X32-NEXT: movl 8(%ebp), %eax
52 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
53 ; X32-NEXT: movl 12(%ebp), %eax
54 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
55 ; X32-NEXT: movl 16(%ebp), %eax
56 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
57 ; X32-NEXT: movl 20(%ebp), %eax
58 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
59 ; X32-NEXT: movl 24(%ebp), %eax
60 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
61 ; X32-NEXT: movl 28(%ebp), %eax
62 ; X32-NEXT: movl %eax, {{[0-9]+}}(%esp)
63 ; X32-NEXT: leal {{[0-9]+}}(%esp), %ebx
64 ; X32-NEXT: movl $33, %ecx
65 ; X32-NEXT: movl %esp, %edi
66 ; X32-NEXT: movl %ebx, %esi
67 ; X32-NEXT: rep;movsl (%esi), %es:(%edi)
69 ; X32-NEXT: movl $33, %ecx
70 ; X32-NEXT: movl %esp, %edi
71 ; X32-NEXT: movl %ebx, %esi
72 ; X32-NEXT: rep;movsl (%esi), %es:(%edi)
74 ; X32-NEXT: leal -12(%ebp), %esp
81 %d = alloca %struct.s, align 16
82 %tmp = getelementptr %struct.s, %struct.s* %d, i32 0, i32 0
83 store i32 %a1, i32* %tmp, align 16
84 %tmp2 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 1
85 store i32 %a2, i32* %tmp2, align 16
86 %tmp4 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 2
87 store i32 %a3, i32* %tmp4, align 16
88 %tmp6 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 3
89 store i32 %a4, i32* %tmp6, align 16
90 %tmp8 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 4
91 store i32 %a5, i32* %tmp8, align 16
92 %tmp10 = getelementptr %struct.s, %struct.s* %d, i32 0, i32 5
93 store i32 %a6, i32* %tmp10, align 16
94 call void @f( %struct.s* byval %d)
95 call void @f( %struct.s* byval %d)
99 declare void @f(%struct.s* byval)