blob: 9e68e06758911ac9c17710f45cc0d306edc0683a [file] [log] [blame]
Bill Wendlinga0126af2012-04-08 11:00:38 +00001; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
Duncan P. N. Exon Smith13f5c582014-08-19 21:08:27 +00002; RUN: verify-uselistorder %s
Dan Gohman7dc1def2008-06-09 21:26:13 +00003
Bill Wendlinga0126af2012-04-08 11:00:38 +00004; CHECK: @foo
5; CHECK: store { i32, i32 } { i32 7, i32 9 }, { i32, i32 }* %x
6; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +00007define void @foo({i32, i32}* %x) nounwind {
8 store {i32, i32}{i32 7, i32 9}, {i32, i32}* %x
9 ret void
10}
Bill Wendlinga0126af2012-04-08 11:00:38 +000011
12; CHECK: @foo_empty
13; CHECK: store {} zeroinitializer, {}* %x
14; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000015define void @foo_empty({}* %x) nounwind {
16 store {}{}, {}* %x
17 ret void
18}
Bill Wendlinga0126af2012-04-08 11:00:38 +000019
20; CHECK: @bar
21; CHECK: store [2 x i32] [i32 7, i32 9], [2 x i32]* %x
22; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000023define void @bar([2 x i32]* %x) nounwind {
24 store [2 x i32][i32 7, i32 9], [2 x i32]* %x
25 ret void
26}
Bill Wendlinga0126af2012-04-08 11:00:38 +000027
28; CHECK: @bar_empty
29; CHECK: store [0 x i32] undef, [0 x i32]* %x
30; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000031define void @bar_empty([0 x i32]* %x) nounwind {
32 store [0 x i32][], [0 x i32]* %x
33 ret void
34}
Bill Wendlinga0126af2012-04-08 11:00:38 +000035
36; CHECK: @qux
37; CHECK: store <{ i32, i32 }> <{ i32 7, i32 9 }>, <{ i32, i32 }>* %x
38; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000039define void @qux(<{i32, i32}>* %x) nounwind {
40 store <{i32, i32}><{i32 7, i32 9}>, <{i32, i32}>* %x
41 ret void
42}
Bill Wendlinga0126af2012-04-08 11:00:38 +000043
44; CHECK: @qux_empty
45; CHECK: store <{}> zeroinitializer, <{}>* %x
46; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000047define void @qux_empty(<{}>* %x) nounwind {
48 store <{}><{}>, <{}>* %x
49 ret void
50}
51