99 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-linux -mattr=-avx | FileCheck %s -check-prefix=X643; Win64 has not supported byval yet.4; RUN: llc < %s -mtriple=i686-- -mattr=-avx | FileCheck %s -check-prefix=X865 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,10 i32 }11 12define void @g(i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6) nounwind {13; X64-LABEL: g:14; X64: # %bb.0: # %entry15; X64-NEXT: pushq %rbx16; X64-NEXT: subq $288, %rsp # imm = 0x12017; 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), %rbx24; X64-NEXT: movl $16, %ecx25; X64-NEXT: movq %rsp, %rdi26; X64-NEXT: movq %rbx, %rsi27; X64-NEXT: rep;movsq (%rsi), %es:(%rdi)28; X64-NEXT: movl {{[0-9]+}}(%rsp), %eax29; X64-NEXT: movl %eax, {{[0-9]+}}(%rsp)30; X64-NEXT: callq f@PLT31; X64-NEXT: movl $16, %ecx32; X64-NEXT: movq %rsp, %rdi33; X64-NEXT: movq %rbx, %rsi34; X64-NEXT: rep;movsq (%rsi), %es:(%rdi)35; X64-NEXT: movl {{[0-9]+}}(%rsp), %eax36; X64-NEXT: movl %eax, {{[0-9]+}}(%rsp)37; X64-NEXT: callq f@PLT38; X64-NEXT: addq $288, %rsp # imm = 0x12039; X64-NEXT: popq %rbx40; X64-NEXT: retq41;42; X86-LABEL: g:43; X86: # %bb.0: # %entry44; X86-NEXT: pushl %ebp45; X86-NEXT: movl %esp, %ebp46; X86-NEXT: pushl %ebx47; X86-NEXT: pushl %edi48; X86-NEXT: pushl %esi49; X86-NEXT: andl $-16, %esp50; X86-NEXT: subl $288, %esp # imm = 0x12051; X86-NEXT: movl 8(%ebp), %eax52; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)53; X86-NEXT: movl 12(%ebp), %eax54; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)55; X86-NEXT: movl 16(%ebp), %eax56; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)57; X86-NEXT: movl 20(%ebp), %eax58; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)59; X86-NEXT: movl 24(%ebp), %eax60; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)61; X86-NEXT: movl 28(%ebp), %eax62; X86-NEXT: movl %eax, {{[0-9]+}}(%esp)63; X86-NEXT: leal {{[0-9]+}}(%esp), %ebx64; X86-NEXT: movl $33, %ecx65; X86-NEXT: movl %esp, %edi66; X86-NEXT: movl %ebx, %esi67; X86-NEXT: rep;movsl (%esi), %es:(%edi)68; X86-NEXT: calll f@PLT69; X86-NEXT: movl $33, %ecx70; X86-NEXT: movl %esp, %edi71; X86-NEXT: movl %ebx, %esi72; X86-NEXT: rep;movsl (%esi), %es:(%edi)73; X86-NEXT: calll f@PLT74; X86-NEXT: leal -12(%ebp), %esp75; X86-NEXT: popl %esi76; X86-NEXT: popl %edi77; X86-NEXT: popl %ebx78; X86-NEXT: popl %ebp79; X86-NEXT: retl80entry:81 %d = alloca %struct.s, align 1682 store i32 %a1, ptr %d, align 1683 %tmp2 = getelementptr %struct.s, ptr %d, i32 0, i32 184 store i32 %a2, ptr %tmp2, align 1685 %tmp4 = getelementptr %struct.s, ptr %d, i32 0, i32 286 store i32 %a3, ptr %tmp4, align 1687 %tmp6 = getelementptr %struct.s, ptr %d, i32 0, i32 388 store i32 %a4, ptr %tmp6, align 1689 %tmp8 = getelementptr %struct.s, ptr %d, i32 0, i32 490 store i32 %a5, ptr %tmp8, align 1691 %tmp10 = getelementptr %struct.s, ptr %d, i32 0, i32 592 store i32 %a6, ptr %tmp10, align 1693 call void @f(ptr byval(%struct.s) %d)94 call void @f(ptr byval(%struct.s) %d)95 ret void96}97 98declare void @f(ptr byval(%struct.s))99