1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86 3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64 4 5 %0 = type { i32, i32, i32, i32 } 6 %1 = type { i1, i1, i1, i32 } 7 8 define fastcc %0 @ReturnBigStruct() nounwind readnone { 9 ; X86-LABEL: ReturnBigStruct: 10 ; X86: # %bb.0: # %entry 11 ; X86-NEXT: movl $24601, 12(%ecx) # imm = 0x6019 12 ; X86-NEXT: movl $48, 8(%ecx) 13 ; X86-NEXT: movl $24, 4(%ecx) 14 ; X86-NEXT: movl $12, (%ecx) 15 ; X86-NEXT: movl %ecx, %eax 16 ; X86-NEXT: retl 17 ; 18 ; X64-LABEL: ReturnBigStruct: 19 ; X64: # %bb.0: # %entry 20 ; X64-NEXT: movabsq $105660490448944, %rax # imm = 0x601900000030 21 ; X64-NEXT: movq %rax, 8(%rdi) 22 ; X64-NEXT: movabsq $103079215116, %rax # imm = 0x180000000C 23 ; X64-NEXT: movq %rax, (%rdi) 24 ; X64-NEXT: movq %rdi, %rax 25 ; X64-NEXT: retq 26 entry: 27 %0 = insertvalue %0 zeroinitializer, i32 12, 0 28 %1 = insertvalue %0 %0, i32 24, 1 29 %2 = insertvalue %0 %1, i32 48, 2 30 %3 = insertvalue %0 %2, i32 24601, 3 31 ret %0 %3 32 } 33 34 35 define fastcc %1 @ReturnBigStruct2() nounwind readnone { 36 ; X86-LABEL: ReturnBigStruct2: 37 ; X86: # %bb.0: # %entry 38 ; X86-NEXT: movl $48, 4(%ecx) 39 ; X86-NEXT: movb $1, 2(%ecx) 40 ; X86-NEXT: movw $256, (%ecx) # imm = 0x100 41 ; X86-NEXT: movl %ecx, %eax 42 ; X86-NEXT: retl 43 ; 44 ; X64-LABEL: ReturnBigStruct2: 45 ; X64: # %bb.0: # %entry 46 ; X64-NEXT: movl $48, 4(%rdi) 47 ; X64-NEXT: movb $1, 2(%rdi) 48 ; X64-NEXT: movw $256, (%rdi) # imm = 0x100 49 ; X64-NEXT: movq %rdi, %rax 50 ; X64-NEXT: retq 51 entry: 52 %0 = insertvalue %1 zeroinitializer, i1 false, 0 53 %1 = insertvalue %1 %0, i1 true, 1 54 %2 = insertvalue %1 %1, i1 true, 2 55 %3 = insertvalue %1 %2, i32 48, 3 56 ret %1 %3 57 } 58