2017-08-01 21:12:15 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
|
2009-11-12 03:59:24 +08:00
|
|
|
|
|
|
|
%0 = type { i32, i32, i32, i32 }
|
2012-05-25 08:09:29 +08:00
|
|
|
%1 = type { i1, i1, i1, i32 }
|
2009-11-12 03:59:24 +08:00
|
|
|
|
2012-05-25 08:09:29 +08:00
|
|
|
define fastcc %0 @ReturnBigStruct() nounwind readnone {
|
2017-08-01 21:12:15 +08:00
|
|
|
; X86-LABEL: ReturnBigStruct:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X86: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; X86-NEXT: movl %ecx, %eax
|
2017-08-01 21:12:15 +08:00
|
|
|
; X86-NEXT: movl $24601, 12(%ecx) # imm = 0x6019
|
|
|
|
; X86-NEXT: movl $48, 8(%ecx)
|
|
|
|
; X86-NEXT: movl $24, 4(%ecx)
|
|
|
|
; X86-NEXT: movl $12, (%ecx)
|
|
|
|
; X86-NEXT: retl
|
|
|
|
;
|
|
|
|
; X64-LABEL: ReturnBigStruct:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2017-08-01 21:12:15 +08:00
|
|
|
; X64-NEXT: movq %rdi, %rax
|
2018-09-20 02:59:08 +08:00
|
|
|
; X64-NEXT: movabsq $105660490448944, %rcx # imm = 0x601900000030
|
|
|
|
; X64-NEXT: movq %rcx, 8(%rdi)
|
|
|
|
; X64-NEXT: movabsq $103079215116, %rcx # imm = 0x180000000C
|
|
|
|
; X64-NEXT: movq %rcx, (%rdi)
|
2017-08-01 21:12:15 +08:00
|
|
|
; X64-NEXT: retq
|
2009-11-12 03:59:24 +08:00
|
|
|
entry:
|
|
|
|
%0 = insertvalue %0 zeroinitializer, i32 12, 0
|
|
|
|
%1 = insertvalue %0 %0, i32 24, 1
|
|
|
|
%2 = insertvalue %0 %1, i32 48, 2
|
|
|
|
%3 = insertvalue %0 %2, i32 24601, 3
|
|
|
|
ret %0 %3
|
|
|
|
}
|
|
|
|
|
2017-08-11 21:21:35 +08:00
|
|
|
|
2012-05-25 08:09:29 +08:00
|
|
|
define fastcc %1 @ReturnBigStruct2() nounwind readnone {
|
2017-08-01 21:12:15 +08:00
|
|
|
; X86-LABEL: ReturnBigStruct2:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X86: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; X86-NEXT: movl %ecx, %eax
|
2017-08-01 21:12:15 +08:00
|
|
|
; X86-NEXT: movl $48, 4(%ecx)
|
|
|
|
; X86-NEXT: movb $1, 2(%ecx)
|
2017-08-11 21:21:35 +08:00
|
|
|
; X86-NEXT: movw $256, (%ecx) # imm = 0x100
|
2017-08-01 21:12:15 +08:00
|
|
|
; X86-NEXT: retl
|
|
|
|
;
|
|
|
|
; X64-LABEL: ReturnBigStruct2:
|
2017-12-05 01:18:51 +08:00
|
|
|
; X64: # %bb.0: # %entry
|
2018-09-20 02:59:08 +08:00
|
|
|
; X64-NEXT: movq %rdi, %rax
|
2017-08-01 21:12:15 +08:00
|
|
|
; X64-NEXT: movl $48, 4(%rdi)
|
|
|
|
; X64-NEXT: movb $1, 2(%rdi)
|
2017-08-11 21:21:35 +08:00
|
|
|
; X64-NEXT: movw $256, (%rdi) # imm = 0x100
|
2017-08-01 21:12:15 +08:00
|
|
|
; X64-NEXT: retq
|
2012-05-25 08:09:29 +08:00
|
|
|
entry:
|
|
|
|
%0 = insertvalue %1 zeroinitializer, i1 false, 0
|
|
|
|
%1 = insertvalue %1 %0, i1 true, 1
|
|
|
|
%2 = insertvalue %1 %1, i1 true, 2
|
|
|
|
%3 = insertvalue %1 %2, i32 48, 3
|
|
|
|
ret %1 %3
|
|
|
|
}
|