blob: d0aab81a4d680b5e27c0a67e25f311c8ced54015 [file] [log] [blame]
Bill Wendlinga0126af2012-04-08 11:00:38 +00001; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
Dan Gohman7dc1def2008-06-09 21:26:13 +00002
Bill Wendlinga0126af2012-04-08 11:00:38 +00003; CHECK: @foo
4; CHECK: store { i32, i32 } { i32 7, i32 9 }, { i32, i32 }* %x
5; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +00006define void @foo({i32, i32}* %x) nounwind {
7 store {i32, i32}{i32 7, i32 9}, {i32, i32}* %x
8 ret void
9}
Bill Wendlinga0126af2012-04-08 11:00:38 +000010
11; CHECK: @foo_empty
12; CHECK: store {} zeroinitializer, {}* %x
13; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000014define void @foo_empty({}* %x) nounwind {
15 store {}{}, {}* %x
16 ret void
17}
Bill Wendlinga0126af2012-04-08 11:00:38 +000018
19; CHECK: @bar
20; CHECK: store [2 x i32] [i32 7, i32 9], [2 x i32]* %x
21; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000022define void @bar([2 x i32]* %x) nounwind {
23 store [2 x i32][i32 7, i32 9], [2 x i32]* %x
24 ret void
25}
Bill Wendlinga0126af2012-04-08 11:00:38 +000026
27; CHECK: @bar_empty
28; CHECK: store [0 x i32] undef, [0 x i32]* %x
29; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000030define void @bar_empty([0 x i32]* %x) nounwind {
31 store [0 x i32][], [0 x i32]* %x
32 ret void
33}
Bill Wendlinga0126af2012-04-08 11:00:38 +000034
35; CHECK: @qux
36; CHECK: store <{ i32, i32 }> <{ i32 7, i32 9 }>, <{ i32, i32 }>* %x
37; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000038define void @qux(<{i32, i32}>* %x) nounwind {
39 store <{i32, i32}><{i32 7, i32 9}>, <{i32, i32}>* %x
40 ret void
41}
Bill Wendlinga0126af2012-04-08 11:00:38 +000042
43; CHECK: @qux_empty
44; CHECK: store <{}> zeroinitializer, <{}>* %x
45; CHECK: ret
Dan Gohman7dc1def2008-06-09 21:26:13 +000046define void @qux_empty(<{}>* %x) nounwind {
47 store <{}><{}>, <{}>* %x
48 ret void
49}
50