xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/PowerPC/ppc64-stackmap.ll (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc; RUN: llc                             < %s | FileCheck %s
2*0a6a1f1dSLionel Sambuc;
3*0a6a1f1dSLionel Sambuc; Note: Print verbose stackmaps using -debug-only=stackmaps.
4*0a6a1f1dSLionel Sambuc
5*0a6a1f1dSLionel Sambuc; We are not getting the correct stack alignment when cross compiling for arm64.
6*0a6a1f1dSLionel Sambuc; So specify a datalayout here.
7*0a6a1f1dSLionel Sambuctarget datalayout = "E-m:e-i64:64-n32:64"
8*0a6a1f1dSLionel Sambuctarget triple = "powerpc64-unknown-linux-gnu"
9*0a6a1f1dSLionel Sambuc
10*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .section  .llvm_stackmaps
11*0a6a1f1dSLionel Sambuc; CHECK-NEXT:  __LLVM_StackMaps:
12*0a6a1f1dSLionel Sambuc; Header
13*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte 1
14*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte 0
15*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 0
16*0a6a1f1dSLionel Sambuc; Num Functions
17*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long 11
18*0a6a1f1dSLionel Sambuc; Num LargeConstants
19*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long 2
20*0a6a1f1dSLionel Sambuc; Num Callsites
21*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long 11
22*0a6a1f1dSLionel Sambuc
23*0a6a1f1dSLionel Sambuc; Functions and stack size
24*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad constantargs
25*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 128
26*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad osrinline
27*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 144
28*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad osrcold
29*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 128
30*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad propertyRead
31*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 128
32*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad propertyWrite
33*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 128
34*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad jsVoidCall
35*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 128
36*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad jsIntCall
37*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 128
38*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad spilledValue
39*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 320
40*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad spilledStackMapValue
41*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 224
42*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad liveConstant
43*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 64
44*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad clobberLR
45*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad 208
46*0a6a1f1dSLionel Sambuc
47*0a6a1f1dSLionel Sambuc; Num LargeConstants
48*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad   4294967295
49*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad   4294967296
50*0a6a1f1dSLionel Sambuc
51*0a6a1f1dSLionel Sambuc; Constant arguments
52*0a6a1f1dSLionel Sambuc;
53*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .quad   1
54*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   .L{{.*}}-.L.constantargs
55*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
56*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  4
57*0a6a1f1dSLionel Sambuc; SmallConstant
58*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   4
59*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
60*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
61*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   65535
62*0a6a1f1dSLionel Sambuc; SmallConstant
63*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   4
64*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
65*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
66*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   65536
67*0a6a1f1dSLionel Sambuc; SmallConstant
68*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   5
69*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
70*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
71*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
72*0a6a1f1dSLionel Sambuc; LargeConstant at index 0
73*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   5
74*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
75*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
76*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   1
77*0a6a1f1dSLionel Sambuc
78*0a6a1f1dSLionel Sambucdefine void @constantargs() {
79*0a6a1f1dSLionel Sambucentry:
80*0a6a1f1dSLionel Sambuc  %0 = inttoptr i64 244837814094590 to i8*
81*0a6a1f1dSLionel Sambuc  tail call void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 1, i32 24, i8* %0, i32 0, i64 65535, i64 65536, i64 4294967295, i64 4294967296)
82*0a6a1f1dSLionel Sambuc  ret void
83*0a6a1f1dSLionel Sambuc}
84*0a6a1f1dSLionel Sambuc
85*0a6a1f1dSLionel Sambuc; Inline OSR Exit
86*0a6a1f1dSLionel Sambuc;
87*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long   .L{{.*}}-.L.osrinline
88*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
89*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  2
90*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
91*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
92*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
93*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
94*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
95*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
96*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
97*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long  0
98*0a6a1f1dSLionel Sambucdefine void @osrinline(i64 %a, i64 %b) {
99*0a6a1f1dSLionel Sambucentry:
100*0a6a1f1dSLionel Sambuc  ; Runtime void->void call.
101*0a6a1f1dSLionel Sambuc  call void inttoptr (i64 244837814094590 to void ()*)()
102*0a6a1f1dSLionel Sambuc  ; Followed by inline OSR patchpoint with 12-byte shadow and 2 live vars.
103*0a6a1f1dSLionel Sambuc  call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 3, i32 12, i64 %a, i64 %b)
104*0a6a1f1dSLionel Sambuc  ret void
105*0a6a1f1dSLionel Sambuc}
106*0a6a1f1dSLionel Sambuc
107*0a6a1f1dSLionel Sambuc; Cold OSR Exit
108*0a6a1f1dSLionel Sambuc;
109*0a6a1f1dSLionel Sambuc; 2 live variables in register.
110*0a6a1f1dSLionel Sambuc;
111*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long   .L{{.*}}-.L.osrcold
112*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
113*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  2
114*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
115*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
116*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
117*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
118*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
119*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
120*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
121*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long  0
122*0a6a1f1dSLionel Sambucdefine void @osrcold(i64 %a, i64 %b) {
123*0a6a1f1dSLionel Sambucentry:
124*0a6a1f1dSLionel Sambuc  %test = icmp slt i64 %a, %b
125*0a6a1f1dSLionel Sambuc  br i1 %test, label %ret, label %cold
126*0a6a1f1dSLionel Sambuccold:
127*0a6a1f1dSLionel Sambuc  ; OSR patchpoint with 12-byte nop-slide and 2 live vars.
128*0a6a1f1dSLionel Sambuc  %thunk = inttoptr i64 244837814094590 to i8*
129*0a6a1f1dSLionel Sambuc  call void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 4, i32 24, i8* %thunk, i32 0, i64 %a, i64 %b)
130*0a6a1f1dSLionel Sambuc  unreachable
131*0a6a1f1dSLionel Sambucret:
132*0a6a1f1dSLionel Sambuc  ret void
133*0a6a1f1dSLionel Sambuc}
134*0a6a1f1dSLionel Sambuc
135*0a6a1f1dSLionel Sambuc; Property Read
136*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long   .L{{.*}}-.L.propertyRead
137*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
138*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
139*0a6a1f1dSLionel Sambuc;
140*0a6a1f1dSLionel Sambuc; FIXME: There are currently no stackmap entries. After moving to
141*0a6a1f1dSLionel Sambuc; AnyRegCC, we will have entries for the object and return value.
142*0a6a1f1dSLionel Sambucdefine i64 @propertyRead(i64* %obj) {
143*0a6a1f1dSLionel Sambucentry:
144*0a6a1f1dSLionel Sambuc  %resolveRead = inttoptr i64 244837814094590 to i8*
145*0a6a1f1dSLionel Sambuc  %result = call i64 (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(i64 5, i32 24, i8* %resolveRead, i32 1, i64* %obj)
146*0a6a1f1dSLionel Sambuc  %add = add i64 %result, 3
147*0a6a1f1dSLionel Sambuc  ret i64 %add
148*0a6a1f1dSLionel Sambuc}
149*0a6a1f1dSLionel Sambuc
150*0a6a1f1dSLionel Sambuc; Property Write
151*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long   .L{{.*}}-.L.propertyWrite
152*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
153*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  2
154*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
155*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
156*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
157*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
158*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
159*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
160*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
161*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
162*0a6a1f1dSLionel Sambucdefine void @propertyWrite(i64 %dummy1, i64* %obj, i64 %dummy2, i64 %a) {
163*0a6a1f1dSLionel Sambucentry:
164*0a6a1f1dSLionel Sambuc  %resolveWrite = inttoptr i64 244837814094590 to i8*
165*0a6a1f1dSLionel Sambuc  call anyregcc void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 6, i32 24, i8* %resolveWrite, i32 2, i64* %obj, i64 %a)
166*0a6a1f1dSLionel Sambuc  ret void
167*0a6a1f1dSLionel Sambuc}
168*0a6a1f1dSLionel Sambuc
169*0a6a1f1dSLionel Sambuc; Void JS Call
170*0a6a1f1dSLionel Sambuc;
171*0a6a1f1dSLionel Sambuc; 2 live variables in registers.
172*0a6a1f1dSLionel Sambuc;
173*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long   .L{{.*}}-.L.jsVoidCall
174*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
175*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  2
176*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
177*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
178*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
179*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
180*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
181*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
182*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
183*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
184*0a6a1f1dSLionel Sambucdefine void @jsVoidCall(i64 %dummy1, i64* %obj, i64 %arg, i64 %l1, i64 %l2) {
185*0a6a1f1dSLionel Sambucentry:
186*0a6a1f1dSLionel Sambuc  %resolveCall = inttoptr i64 244837814094590 to i8*
187*0a6a1f1dSLionel Sambuc  call void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 7, i32 24, i8* %resolveCall, i32 2, i64* %obj, i64 %arg, i64 %l1, i64 %l2)
188*0a6a1f1dSLionel Sambuc  ret void
189*0a6a1f1dSLionel Sambuc}
190*0a6a1f1dSLionel Sambuc
191*0a6a1f1dSLionel Sambuc; i64 JS Call
192*0a6a1f1dSLionel Sambuc;
193*0a6a1f1dSLionel Sambuc; 2 live variables in registers.
194*0a6a1f1dSLionel Sambuc;
195*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long   .L{{.*}}-.L.jsIntCall
196*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
197*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  2
198*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
199*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
200*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
201*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
202*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   1
203*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
204*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  {{[0-9]+}}
205*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   0
206*0a6a1f1dSLionel Sambucdefine i64 @jsIntCall(i64 %dummy1, i64* %obj, i64 %arg, i64 %l1, i64 %l2) {
207*0a6a1f1dSLionel Sambucentry:
208*0a6a1f1dSLionel Sambuc  %resolveCall = inttoptr i64 244837814094590 to i8*
209*0a6a1f1dSLionel Sambuc  %result = call i64 (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(i64 8, i32 24, i8* %resolveCall, i32 2, i64* %obj, i64 %arg, i64 %l1, i64 %l2)
210*0a6a1f1dSLionel Sambuc  %add = add i64 %result, 3
211*0a6a1f1dSLionel Sambuc  ret i64 %add
212*0a6a1f1dSLionel Sambuc}
213*0a6a1f1dSLionel Sambuc
214*0a6a1f1dSLionel Sambuc; Spilled stack map values.
215*0a6a1f1dSLionel Sambuc;
216*0a6a1f1dSLionel Sambuc; Verify 28 stack map entries.
217*0a6a1f1dSLionel Sambuc;
218*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long .L{{.*}}-.L.spilledValue
219*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 0
220*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 28
221*0a6a1f1dSLionel Sambuc;
222*0a6a1f1dSLionel Sambuc; Check that at least one is a spilled entry from r31.
223*0a6a1f1dSLionel Sambuc; Location: Indirect FP + ...
224*0a6a1f1dSLionel Sambuc; CHECK:        .byte 3
225*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte 8
226*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 31
227*0a6a1f1dSLionel Sambucdefine void @spilledValue(i64 %arg0, i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %l0, i64 %l1, i64 %l2, i64 %l3, i64 %l4, i64 %l5, i64 %l6, i64 %l7, i64 %l8, i64 %l9, i64 %l10, i64 %l11, i64 %l12, i64 %l13, i64 %l14, i64 %l15, i64 %l16, i64 %l17, i64 %l18, i64 %l19, i64 %l20, i64 %l21, i64 %l22, i64 %l23, i64 %l24, i64 %l25, i64 %l26, i64 %l27) {
228*0a6a1f1dSLionel Sambucentry:
229*0a6a1f1dSLionel Sambuc  call void (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.void(i64 11, i32 24, i8* null, i32 5, i64 %arg0, i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %l0, i64 %l1, i64 %l2, i64 %l3, i64 %l4, i64 %l5, i64 %l6, i64 %l7, i64 %l8, i64 %l9, i64 %l10, i64 %l11, i64 %l12, i64 %l13, i64 %l14, i64 %l15, i64 %l16, i64 %l17, i64 %l18, i64 %l19, i64 %l20, i64 %l21, i64 %l22, i64 %l23, i64 %l24, i64 %l25, i64 %l26, i64 %l27)
230*0a6a1f1dSLionel Sambuc  ret void
231*0a6a1f1dSLionel Sambuc}
232*0a6a1f1dSLionel Sambuc
233*0a6a1f1dSLionel Sambuc; Spilled stack map values.
234*0a6a1f1dSLionel Sambuc;
235*0a6a1f1dSLionel Sambuc; Verify 30 stack map entries.
236*0a6a1f1dSLionel Sambuc;
237*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long .L{{.*}}-.L.spilledStackMapValue
238*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 0
239*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 30
240*0a6a1f1dSLionel Sambuc;
241*0a6a1f1dSLionel Sambuc; Check that at least one is a spilled entry from r31.
242*0a6a1f1dSLionel Sambuc; Location: Indirect FP + ...
243*0a6a1f1dSLionel Sambuc; CHECK:        .byte 3
244*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte 8
245*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 31
246*0a6a1f1dSLionel Sambucdefine webkit_jscc void @spilledStackMapValue(i64 %l0, i64 %l1, i64 %l2, i64 %l3, i64 %l4, i64 %l5, i64 %l6, i64 %l7, i64 %l8, i64 %l9, i64 %l10, i64 %l11, i64 %l12, i64 %l13, i64 %l14, i64 %l15, i64 %l16, i64 %l17, i64 %l18, i64 %l19, i64 %l20, i64 %l21, i64 %l22, i64 %l23, i64 %l24, i64 %l25, i64 %l26, i64 %l27, i64 %l28, i64 %l29) {
247*0a6a1f1dSLionel Sambucentry:
248*0a6a1f1dSLionel Sambuc  call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 12, i32 16, i64 %l0, i64 %l1, i64 %l2, i64 %l3, i64 %l4, i64 %l5, i64 %l6, i64 %l7, i64 %l8, i64 %l9, i64 %l10, i64 %l11, i64 %l12, i64 %l13, i64 %l14, i64 %l15, i64 %l16, i64 %l17, i64 %l18, i64 %l19, i64 %l20, i64 %l21, i64 %l22, i64 %l23, i64 %l24, i64 %l25, i64 %l26, i64 %l27, i64 %l28, i64 %l29)
249*0a6a1f1dSLionel Sambuc  ret void
250*0a6a1f1dSLionel Sambuc}
251*0a6a1f1dSLionel Sambuc
252*0a6a1f1dSLionel Sambuc
253*0a6a1f1dSLionel Sambuc; Map a constant value.
254*0a6a1f1dSLionel Sambuc;
255*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long .L{{.*}}-.L.liveConstant
256*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 0
257*0a6a1f1dSLionel Sambuc; 1 location
258*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 1
259*0a6a1f1dSLionel Sambuc; Loc 0: SmallConstant
260*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   4
261*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   8
262*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  0
263*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   33
264*0a6a1f1dSLionel Sambuc
265*0a6a1f1dSLionel Sambucdefine void @liveConstant() {
266*0a6a1f1dSLionel Sambuc  tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 15, i32 8, i32 33)
267*0a6a1f1dSLionel Sambuc  ret void
268*0a6a1f1dSLionel Sambuc}
269*0a6a1f1dSLionel Sambuc
270*0a6a1f1dSLionel Sambuc; Map a value when LR is the only free register.
271*0a6a1f1dSLionel Sambuc;
272*0a6a1f1dSLionel Sambuc; CHECK-LABEL:  .long .L{{.*}}-.L.clobberLR
273*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 0
274*0a6a1f1dSLionel Sambuc; 1 location
275*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short 1
276*0a6a1f1dSLionel Sambuc; Loc 0: Indirect FP (r31) - offset
277*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   3
278*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .byte   4
279*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .short  31
280*0a6a1f1dSLionel Sambuc; CHECK-NEXT:   .long   {{[0-9]+}}
281*0a6a1f1dSLionel Sambucdefine void @clobberLR(i32 %a) {
282*0a6a1f1dSLionel Sambuc  tail call void asm sideeffect "nop", "~{r0},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{r14},~{r15},~{r16},~{r17},~{r18},~{r19},~{r20},~{r21},~{r22},~{r23},~{r24},~{r25},~{r26},~{r27},~{r28},~{r29},~{r30},~{r31}"() nounwind
283*0a6a1f1dSLionel Sambuc  tail call void (i64, i32, ...)* @llvm.experimental.stackmap(i64 16, i32 8, i32 %a)
284*0a6a1f1dSLionel Sambuc  ret void
285*0a6a1f1dSLionel Sambuc}
286*0a6a1f1dSLionel Sambuc
287*0a6a1f1dSLionel Sambucdeclare void @llvm.experimental.stackmap(i64, i32, ...)
288*0a6a1f1dSLionel Sambucdeclare void @llvm.experimental.patchpoint.void(i64, i32, i8*, i32, ...)
289*0a6a1f1dSLionel Sambucdeclare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...)
290