| Eli Friedman | 315a0c7 | 2012-05-25 00:09:29 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 | FileCheck %s | 
| Kenneth Uildriks | 9f34406 | 2009-11-11 19:59:24 +0000 | [diff] [blame] | 2 |  | 
|  | 3 | %0 = type { i32, i32, i32, i32 } | 
| Eli Friedman | 315a0c7 | 2012-05-25 00:09:29 +0000 | [diff] [blame] | 4 | %1 = type { i1, i1, i1, i32 } | 
| Kenneth Uildriks | 9f34406 | 2009-11-11 19:59:24 +0000 | [diff] [blame] | 5 |  | 
| Eli Friedman | 315a0c7 | 2012-05-25 00:09:29 +0000 | [diff] [blame] | 6 | ; CHECK: ReturnBigStruct | 
|  | 7 | ; CHECK: movl $24601, 12(%ecx) | 
|  | 8 | ; CHECK: movl	$48, 8(%ecx) | 
|  | 9 | ; CHECK: movl	$24, 4(%ecx) | 
|  | 10 | ; CHECK: movl	$12, (%ecx) | 
|  | 11 |  | 
|  | 12 | define fastcc %0 @ReturnBigStruct() nounwind readnone { | 
| Kenneth Uildriks | 9f34406 | 2009-11-11 19:59:24 +0000 | [diff] [blame] | 13 | entry: | 
|  | 14 | %0 = insertvalue %0 zeroinitializer, i32 12, 0 | 
|  | 15 | %1 = insertvalue %0 %0, i32 24, 1 | 
|  | 16 | %2 = insertvalue %0 %1, i32 48, 2 | 
|  | 17 | %3 = insertvalue %0 %2, i32 24601, 3 | 
|  | 18 | ret %0 %3 | 
|  | 19 | } | 
|  | 20 |  | 
| Eli Friedman | 315a0c7 | 2012-05-25 00:09:29 +0000 | [diff] [blame] | 21 | ; CHECK: ReturnBigStruct2 | 
|  | 22 | ; CHECK: movl	$48, 4(%ecx) | 
|  | 23 | ; CHECK: movb	$1, 2(%ecx) | 
|  | 24 | ; CHECK: movb	$1, 1(%ecx) | 
|  | 25 | ; CHECK: movb	$0, (%ecx) | 
|  | 26 |  | 
|  | 27 | define fastcc %1 @ReturnBigStruct2() nounwind readnone { | 
|  | 28 | entry: | 
|  | 29 | %0 = insertvalue %1 zeroinitializer, i1 false, 0 | 
|  | 30 | %1 = insertvalue %1 %0, i1 true, 1 | 
|  | 31 | %2 = insertvalue %1 %1, i1 true, 2 | 
|  | 32 | %3 = insertvalue %1 %2, i32 48, 3 | 
|  | 33 | ret %1 %3 | 
|  | 34 | } |