1; RUN: llc < %s -mtriple="x86_64-pc-linux-gnu" | FileCheck %s
2
3declare void @callee()
4
5define void @f_0(<1024 x i64> %val) {
6; CHECK:      .quad	2882400015
7; CHECK-NEXT: .long	.Ltmp0-f_0
8; CHECK-NEXT: .short	0
9; CHECK-NEXT: .short	4
10; Constant(0)
11; CHECK-NEXT: .byte	4
12; CHECK-NEXT: .byte	0
13; CHECK-NEXT: .short	8
14; CHECK-NEXT: .short	0
15; CHECK-NEXT: .short	0
16; CHECK-NEXT: .long	0
17; Constant(0)
18; CHECK-NEXT: .byte	4
19; CHECK-NEXT: .byte	0
20; CHECK-NEXT: .short	8
21; CHECK-NEXT: .short	0
22; CHECK-NEXT: .short	0
23; CHECK-NEXT: .long	0
24; Constant(1)
25; CHECK-NEXT: .byte	4
26; CHECK-NEXT: .byte	0
27; CHECK-NEXT: .short	8
28; CHECK-NEXT: .short	0
29; CHECK-NEXT: .short	0
30; CHECK-NEXT: .long	1
31; Indirect
32; CHECK-NEXT: .byte	3
33; CHECK-NEXT: .byte	0
34; CHECK-NEXT: .short	8192
35; CHECK-NEXT: .short	7
36; CHECK-NEXT: .short	0
37; CHECK-NEXT: .long	0
38; Padding
39; CHECK-NEXT: .p2align	3
40  call void @callee() [ "deopt"(<1024 x i64> %val) ]
41  ret void
42}
43
44define void @f_1(<1024 x i8*> %val) {
45; CHECK:      .quad	2882400015
46; CHECK-NEXT: .long	.Ltmp1-f_1
47; CHECK-NEXT: .short	0
48; CHECK-NEXT: .short	4
49; Constant(0)
50; CHECK-NEXT: .byte	4
51; CHECK-NEXT: .byte	0
52; CHECK-NEXT: .short	8
53; CHECK-NEXT: .short	0
54; CHECK-NEXT: .short	0
55; CHECK-NEXT: .long	0
56; Constant(0)
57; CHECK-NEXT: .byte	4
58; CHECK-NEXT: .byte	0
59; CHECK-NEXT: .short	8
60; CHECK-NEXT: .short	0
61; CHECK-NEXT: .short	0
62; CHECK-NEXT: .long	0
63; Constant(1)
64; CHECK-NEXT: .byte	4
65; CHECK-NEXT: .byte	0
66; CHECK-NEXT: .short	8
67; CHECK-NEXT: .short	0
68; CHECK-NEXT: .short	0
69; CHECK-NEXT: .long	1
70; Indirect
71; CHECK-NEXT: .byte	3
72; CHECK-NEXT: .byte	0
73; CHECK-NEXT: .short	8192
74; CHECK-NEXT: .short	7
75; CHECK-NEXT: .short	0
76; CHECK-NEXT: .long	0
77; Padding
78; CHECK-NEXT: .p2align	3
79  call void @callee() [ "deopt"(<1024 x i8*> %val) ]
80  ret void
81}
82
83define void @f_2(<99 x i8*> %val) {
84; CHECK:      .quad	2882400015
85; CHECK-NEXT: .long	.Ltmp2-f_2
86; CHECK-NEXT: .short	0
87; CHECK-NEXT: .short	4
88; Constant(0)
89; CHECK-NEXT: .byte	4
90; CHECK-NEXT: .byte	0
91; CHECK-NEXT: .short	8
92; CHECK-NEXT: .short	0
93; CHECK-NEXT: .short	0
94; CHECK-NEXT: .long	0
95; Constant(0)
96; CHECK-NEXT: .byte	4
97; CHECK-NEXT: .byte	0
98; CHECK-NEXT: .short	8
99; CHECK-NEXT: .short	0
100; CHECK-NEXT: .short	0
101; CHECK-NEXT: .long	0
102; Constant(1)
103; CHECK-NEXT: .byte	4
104; CHECK-NEXT: .byte	0
105; CHECK-NEXT: .short	8
106; CHECK-NEXT: .short	0
107; CHECK-NEXT: .short	0
108; CHECK-NEXT: .long	1
109; Indirect
110; CHECK-NEXT: .byte	3
111; CHECK-NEXT: .byte	0
112; CHECK-NEXT: .short	792
113; CHECK-NEXT: .short	7
114; CHECK-NEXT: .short	0
115; CHECK-NEXT: .long	0
116; CHECK-NEXT: .p2align	3
117  call void @callee() [ "deopt"(<99 x i8*> %val) ]
118  ret void
119}
120
121
122define <400 x i8 addrspace(1)*> @f_3(<400 x i8 addrspace(1)*> %obj) gc "statepoint-example" {
123; CHECK:      .quad	4242
124; CHECK-NEXT: .long	.Ltmp3-f_3
125; CHECK-NEXT: .short	0
126; CHECK-NEXT: .short	5
127; Constant(0)
128; CHECK-NEXT: .byte	4
129; CHECK-NEXT: .byte	0
130; CHECK-NEXT: .short	8
131; CHECK-NEXT: .short	0
132; CHECK-NEXT: .short	0
133; CHECK-NEXT: .long	0
134; Constant(0)
135; CHECK-NEXT: .byte	4
136; CHECK-NEXT: .byte	0
137; CHECK-NEXT: .short	8
138; CHECK-NEXT: .short	0
139; CHECK-NEXT: .short	0
140; CHECK-NEXT: .long	0
141; Constant(0)
142; CHECK-NEXT: .byte	4
143; CHECK-NEXT: .byte	0
144; CHECK-NEXT: .short	8
145; CHECK-NEXT: .short	0
146; CHECK-NEXT: .short	0
147; CHECK-NEXT: .long	0
148; Indirect
149; CHECK-NEXT: .byte	3
150; CHECK-NEXT: .byte	0
151; CHECK-NEXT: .short	3200
152; CHECK-NEXT: .short	7
153; CHECK-NEXT: .short	0
154; CHECK-NEXT: .long	0
155; Indirect
156; CHECK-NEXT: .byte	3
157; CHECK-NEXT: .byte	0
158; CHECK-NEXT: .short	3200
159; CHECK-NEXT: .short	7
160; CHECK-NEXT: .short	0
161; CHECK-NEXT: .long	0
162; Padding
163; CHECK-NEXT: .p2align	3
164  %tok = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 4242, i32 0, void ()* @do_safepoint, i32 0, i32 0, i32 0, i32 0) ["gc-live"(<400 x i8 addrspace(1)*> %obj)]
165  %obj.r = call coldcc <400 x i8 addrspace(1)*> @llvm.experimental.gc.relocate.v400p1i8(token %tok, i32 0, i32 0)
166  ret <400 x i8 addrspace(1)*> %obj.r
167}
168
169declare void @do_safepoint()
170
171declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
172declare <400 x i8 addrspace(1)*> @llvm.experimental.gc.relocate.v400p1i8(token, i32, i32)
173