1 ; RUN: llc < %s -debug-entry-values -mtriple=arm64-apple-darwin | FileCheck %s
3 ; Stackmap Header: no constants - 18 callsites
4 ; CHECK-LABEL: .section __LLVM_STACKMAPS,__llvm_stackmaps
5 ; CHECK-NEXT: __LLVM_StackMaps:
11 ; CHECK-NEXT: .long 22
15 ; CHECK-NEXT: .long 22
17 ; Functions and stack size
18 ; CHECK-NEXT: .quad _test
19 ; CHECK-NEXT: .quad 16
21 ; CHECK-NEXT: .quad _property_access1
22 ; CHECK-NEXT: .quad 16
24 ; CHECK-NEXT: .quad _property_access2
25 ; CHECK-NEXT: .quad 32
27 ; CHECK-NEXT: .quad _property_access3
28 ; CHECK-NEXT: .quad 32
30 ; CHECK-NEXT: .quad _anyreg_test1
31 ; CHECK-NEXT: .quad 16
33 ; CHECK-NEXT: .quad _anyreg_test2
34 ; CHECK-NEXT: .quad 16
36 ; CHECK-NEXT: .quad _patchpoint_spilldef
37 ; CHECK-NEXT: .quad 112
39 ; CHECK-NEXT: .quad _patchpoint_spillargs
40 ; CHECK-NEXT: .quad 128
42 ; CHECK-NEXT: .quad _generic_test_i1
43 ; CHECK-NEXT: .quad 16
45 ; CHECK-NEXT: .quad _generic_test_i8
46 ; CHECK-NEXT: .quad 16
48 ; CHECK-NEXT: .quad _generic_test_i16
49 ; CHECK-NEXT: .quad 16
51 ; CHECK-NEXT: .quad _generic_test_i29
52 ; CHECK-NEXT: .quad 16
54 ; CHECK-NEXT: .quad _generic_test_i32
55 ; CHECK-NEXT: .quad 16
57 ; CHECK-NEXT: .quad _generic_test_i64
58 ; CHECK-NEXT: .quad 16
60 ; CHECK-NEXT: .quad _generic_test_p0
61 ; CHECK-NEXT: .quad 16
63 ; CHECK-NEXT: .quad _generic_test_f16
64 ; CHECK-NEXT: .quad 16
66 ; CHECK-NEXT: .quad _generic_test_f32
67 ; CHECK-NEXT: .quad 16
69 ; CHECK-NEXT: .quad _generic_test_f64
70 ; CHECK-NEXT: .quad 16
72 ; CHECK-NEXT: .quad _generic_test_v16i8
73 ; CHECK-NEXT: .quad 16
75 ; CHECK-NEXT: .quad _generic_test_v4i32
76 ; CHECK-NEXT: .quad 16
78 ; CHECK-NEXT: .quad _generic_test_v4f32
79 ; CHECK-NEXT: .quad 16
81 ; CHECK-NEXT: .quad _generic_test_v2f64
82 ; CHECK-NEXT: .quad 16
87 ; CHECK-LABEL: .long L{{.*}}-_test
88 ; CHECK-NEXT: .short 0
90 ; CHECK-NEXT: .short 3
94 ; CHECK-NEXT: .short 4
95 ; CHECK-NEXT: .short {{[0-9]+}}
96 ; CHECK-NEXT: .short 0
100 ; CHECK-NEXT: .byte 0
101 ; CHECK-NEXT: .short 4
102 ; CHECK-NEXT: .short {{[0-9]+}}
103 ; CHECK-NEXT: .short 0
104 ; CHECK-NEXT: .long 0
106 ; CHECK-NEXT: .byte 4
107 ; CHECK-NEXT: .byte 0
108 ; CHECK-NEXT: .short 8
109 ; CHECK-NEXT: .short 0
110 ; CHECK-NEXT: .short 0
111 ; CHECK-NEXT: .long 3
112 define i64 @test() nounwind ssp uwtable {
114 call anyregcc void (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.void(i64 0, i32 16, ptr null, i32 2, i32 1, i32 2, i64 3)
118 ; property access 1 - %obj is an anyreg call argument and should therefore be in a register
119 ; CHECK-LABEL: .long L{{.*}}-_property_access1
120 ; CHECK-NEXT: .short 0
122 ; CHECK-NEXT: .short 2
123 ; Loc 0: Register <-- this is the return register
124 ; CHECK-NEXT: .byte 1
125 ; CHECK-NEXT: .byte 0
126 ; CHECK-NEXT: .short 8
127 ; CHECK-NEXT: .short {{[0-9]+}}
128 ; CHECK-NEXT: .short 0
129 ; CHECK-NEXT: .long 0
131 ; CHECK-NEXT: .byte 1
132 ; CHECK-NEXT: .byte 0
133 ; CHECK-NEXT: .short 8
134 ; CHECK-NEXT: .short {{[0-9]+}}
135 ; CHECK-NEXT: .short 0
136 ; CHECK-NEXT: .long 0
137 define i64 @property_access1(ptr %obj) nounwind ssp uwtable {
139 %f = inttoptr i64 281474417671919 to ptr
140 %ret = call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 1, i32 20, ptr %f, i32 1, ptr %obj)
144 ; property access 2 - %obj is an anyreg call argument and should therefore be in a register
145 ; CHECK-LABEL: .long L{{.*}}-_property_access2
146 ; CHECK-NEXT: .short 0
148 ; CHECK-NEXT: .short 2
149 ; Loc 0: Register <-- this is the return register
150 ; CHECK-NEXT: .byte 1
151 ; CHECK-NEXT: .byte 0
152 ; CHECK-NEXT: .short 8
153 ; CHECK-NEXT: .short {{[0-9]+}}
154 ; CHECK-NEXT: .short 0
155 ; CHECK-NEXT: .long 0
157 ; CHECK-NEXT: .byte 1
158 ; CHECK-NEXT: .byte 0
159 ; CHECK-NEXT: .short 8
160 ; CHECK-NEXT: .short {{[0-9]+}}
161 ; CHECK-NEXT: .short 0
162 ; CHECK-NEXT: .long 0
163 define i64 @property_access2() nounwind ssp uwtable {
165 %obj = alloca i64, align 8
166 %f = inttoptr i64 281474417671919 to ptr
167 %ret = call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 2, i32 20, ptr %f, i32 1, ptr %obj)
171 ; property access 3 - %obj is a frame index
172 ; CHECK-LABEL: .long L{{.*}}-_property_access3
173 ; CHECK-NEXT: .short 0
175 ; CHECK-NEXT: .short 2
176 ; Loc 0: Register <-- this is the return register
177 ; CHECK-NEXT: .byte 1
178 ; CHECK-NEXT: .byte 0
179 ; CHECK-NEXT: .short 8
180 ; CHECK-NEXT: .short {{[0-9]+}}
181 ; CHECK-NEXT: .short 0
182 ; CHECK-NEXT: .long 0
183 ; Loc 1: Direct FP - 8
184 ; CHECK-NEXT: .byte 2
185 ; CHECK-NEXT: .byte 0
186 ; CHECK-NEXT: .short 8
187 ; CHECK-NEXT: .short 29
188 ; CHECK-NEXT: .short 0
189 ; CHECK-NEXT: .long -8
190 define i64 @property_access3() nounwind ssp uwtable {
192 %obj = alloca i64, align 8
193 %f = inttoptr i64 281474417671919 to ptr
194 %ret = call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 3, i32 20, ptr %f, i32 0, ptr %obj)
199 ; CHECK-LABEL: .long L{{.*}}-_anyreg_test1
200 ; CHECK-NEXT: .short 0
202 ; CHECK-NEXT: .short 14
203 ; Loc 0: Register <-- this is the return register
204 ; CHECK-NEXT: .byte 1
205 ; CHECK-NEXT: .byte 0
206 ; CHECK-NEXT: .short 8
207 ; CHECK-NEXT: .short {{[0-9]+}}
208 ; CHECK-NEXT: .short 0
209 ; CHECK-NEXT: .long 0
211 ; CHECK-NEXT: .byte 1
212 ; CHECK-NEXT: .byte 0
213 ; CHECK-NEXT: .short 8
214 ; CHECK-NEXT: .short {{[0-9]+}}
215 ; CHECK-NEXT: .short 0
216 ; CHECK-NEXT: .long 0
218 ; CHECK-NEXT: .byte 1
219 ; CHECK-NEXT: .byte 0
220 ; CHECK-NEXT: .short 8
221 ; CHECK-NEXT: .short {{[0-9]+}}
222 ; CHECK-NEXT: .short 0
223 ; CHECK-NEXT: .long 0
225 ; CHECK-NEXT: .byte 1
226 ; CHECK-NEXT: .byte 0
227 ; CHECK-NEXT: .short 8
228 ; CHECK-NEXT: .short {{[0-9]+}}
229 ; CHECK-NEXT: .short 0
230 ; CHECK-NEXT: .long 0
232 ; CHECK-NEXT: .byte 1
233 ; CHECK-NEXT: .byte 0
234 ; CHECK-NEXT: .short 8
235 ; CHECK-NEXT: .short {{[0-9]+}}
236 ; CHECK-NEXT: .short 0
237 ; CHECK-NEXT: .long 0
239 ; CHECK-NEXT: .byte 1
240 ; CHECK-NEXT: .byte 0
241 ; CHECK-NEXT: .short 8
242 ; CHECK-NEXT: .short {{[0-9]+}}
243 ; CHECK-NEXT: .short 0
244 ; CHECK-NEXT: .long 0
246 ; CHECK-NEXT: .byte 1
247 ; CHECK-NEXT: .byte 0
248 ; CHECK-NEXT: .short 8
249 ; CHECK-NEXT: .short {{[0-9]+}}
250 ; CHECK-NEXT: .short 0
251 ; CHECK-NEXT: .long 0
253 ; CHECK-NEXT: .byte 1
254 ; CHECK-NEXT: .byte 0
255 ; CHECK-NEXT: .short 8
256 ; CHECK-NEXT: .short {{[0-9]+}}
257 ; CHECK-NEXT: .short 0
258 ; CHECK-NEXT: .long 0
260 ; CHECK-NEXT: .byte 1
261 ; CHECK-NEXT: .byte 0
262 ; CHECK-NEXT: .short 8
263 ; CHECK-NEXT: .short {{[0-9]+}}
264 ; CHECK-NEXT: .short 0
265 ; CHECK-NEXT: .long 0
267 ; CHECK-NEXT: .byte 1
268 ; CHECK-NEXT: .byte 0
269 ; CHECK-NEXT: .short 8
270 ; CHECK-NEXT: .short {{[0-9]+}}
271 ; CHECK-NEXT: .short 0
272 ; CHECK-NEXT: .long 0
274 ; CHECK-NEXT: .byte 1
275 ; CHECK-NEXT: .byte 0
276 ; CHECK-NEXT: .short 8
277 ; CHECK-NEXT: .short {{[0-9]+}}
278 ; CHECK-NEXT: .short 0
279 ; CHECK-NEXT: .long 0
281 ; CHECK-NEXT: .byte 1
282 ; CHECK-NEXT: .byte 0
283 ; CHECK-NEXT: .short 8
284 ; CHECK-NEXT: .short {{[0-9]+}}
285 ; CHECK-NEXT: .short 0
286 ; CHECK-NEXT: .long 0
288 ; CHECK-NEXT: .byte 1
289 ; CHECK-NEXT: .byte 0
290 ; CHECK-NEXT: .short 8
291 ; CHECK-NEXT: .short {{[0-9]+}}
292 ; CHECK-NEXT: .short 0
293 ; CHECK-NEXT: .long 0
295 ; CHECK-NEXT: .byte 1
296 ; CHECK-NEXT: .byte 0
297 ; CHECK-NEXT: .short 8
298 ; CHECK-NEXT: .short {{[0-9]+}}
299 ; CHECK-NEXT: .short 0
300 ; CHECK-NEXT: .long 0
301 define i64 @anyreg_test1(ptr %a1, ptr %a2, ptr %a3, ptr %a4, ptr %a5, ptr %a6, ptr %a7, ptr %a8, ptr %a9, ptr %a10, ptr %a11, ptr %a12, ptr %a13) nounwind ssp uwtable {
303 %f = inttoptr i64 281474417671919 to ptr
304 %ret = call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 4, i32 20, ptr %f, i32 13, ptr %a1, ptr %a2, ptr %a3, ptr %a4, ptr %a5, ptr %a6, ptr %a7, ptr %a8, ptr %a9, ptr %a10, ptr %a11, ptr %a12, ptr %a13)
309 ; CHECK-LABEL: .long L{{.*}}-_anyreg_test2
310 ; CHECK-NEXT: .short 0
312 ; CHECK-NEXT: .short 14
313 ; Loc 0: Register <-- this is the return register
314 ; CHECK-NEXT: .byte 1
315 ; CHECK-NEXT: .byte 0
316 ; CHECK-NEXT: .short 8
317 ; CHECK-NEXT: .short {{[0-9]+}}
318 ; CHECK-NEXT: .short 0
319 ; CHECK-NEXT: .long 0
321 ; CHECK-NEXT: .byte 1
322 ; CHECK-NEXT: .byte 0
323 ; CHECK-NEXT: .short 8
324 ; CHECK-NEXT: .short {{[0-9]+}}
325 ; CHECK-NEXT: .short 0
326 ; CHECK-NEXT: .long 0
328 ; CHECK-NEXT: .byte 1
329 ; CHECK-NEXT: .byte 0
330 ; CHECK-NEXT: .short 8
331 ; CHECK-NEXT: .short {{[0-9]+}}
332 ; CHECK-NEXT: .short 0
333 ; CHECK-NEXT: .long 0
335 ; CHECK-NEXT: .byte 1
336 ; CHECK-NEXT: .byte 0
337 ; CHECK-NEXT: .short 8
338 ; CHECK-NEXT: .short {{[0-9]+}}
339 ; CHECK-NEXT: .short 0
340 ; CHECK-NEXT: .long 0
342 ; CHECK-NEXT: .byte 1
343 ; CHECK-NEXT: .byte 0
344 ; CHECK-NEXT: .short 8
345 ; CHECK-NEXT: .short {{[0-9]+}}
346 ; CHECK-NEXT: .short 0
347 ; CHECK-NEXT: .long 0
349 ; CHECK-NEXT: .byte 1
350 ; CHECK-NEXT: .byte 0
351 ; CHECK-NEXT: .short 8
352 ; CHECK-NEXT: .short {{[0-9]+}}
353 ; CHECK-NEXT: .short 0
354 ; CHECK-NEXT: .long 0
356 ; CHECK-NEXT: .byte 1
357 ; CHECK-NEXT: .byte 0
358 ; CHECK-NEXT: .short 8
359 ; CHECK-NEXT: .short {{[0-9]+}}
360 ; CHECK-NEXT: .short 0
361 ; CHECK-NEXT: .long 0
363 ; CHECK-NEXT: .byte 1
364 ; CHECK-NEXT: .byte 0
365 ; CHECK-NEXT: .short 8
366 ; CHECK-NEXT: .short {{[0-9]+}}
367 ; CHECK-NEXT: .short 0
368 ; CHECK-NEXT: .long 0
370 ; CHECK-NEXT: .byte 1
371 ; CHECK-NEXT: .byte 0
372 ; CHECK-NEXT: .short 8
373 ; CHECK-NEXT: .short {{[0-9]+}}
374 ; CHECK-NEXT: .short 0
375 ; CHECK-NEXT: .long 0
377 ; CHECK-NEXT: .byte 1
378 ; CHECK-NEXT: .byte 0
379 ; CHECK-NEXT: .short 8
380 ; CHECK-NEXT: .short {{[0-9]+}}
381 ; CHECK-NEXT: .short 0
382 ; CHECK-NEXT: .long 0
384 ; CHECK-NEXT: .byte 1
385 ; CHECK-NEXT: .byte 0
386 ; CHECK-NEXT: .short 8
387 ; CHECK-NEXT: .short {{[0-9]+}}
388 ; CHECK-NEXT: .short 0
389 ; CHECK-NEXT: .long 0
391 ; CHECK-NEXT: .byte 1
392 ; CHECK-NEXT: .byte 0
393 ; CHECK-NEXT: .short 8
394 ; CHECK-NEXT: .short {{[0-9]+}}
395 ; CHECK-NEXT: .short 0
396 ; CHECK-NEXT: .long 0
398 ; CHECK-NEXT: .byte 1
399 ; CHECK-NEXT: .byte 0
400 ; CHECK-NEXT: .short 8
401 ; CHECK-NEXT: .short {{[0-9]+}}
402 ; CHECK-NEXT: .short 0
403 ; CHECK-NEXT: .long 0
405 ; CHECK-NEXT: .byte 1
406 ; CHECK-NEXT: .byte 0
407 ; CHECK-NEXT: .short 8
408 ; CHECK-NEXT: .short {{[0-9]+}}
409 ; CHECK-NEXT: .short 0
410 ; CHECK-NEXT: .long 0
411 define i64 @anyreg_test2(ptr %a1, ptr %a2, ptr %a3, ptr %a4, ptr %a5, ptr %a6, ptr %a7, ptr %a8, ptr %a9, ptr %a10, ptr %a11, ptr %a12, ptr %a13) nounwind ssp uwtable {
413 %f = inttoptr i64 281474417671919 to ptr
414 %ret = call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 5, i32 20, ptr %f, i32 8, ptr %a1, ptr %a2, ptr %a3, ptr %a4, ptr %a5, ptr %a6, ptr %a7, ptr %a8, ptr %a9, ptr %a10, ptr %a11, ptr %a12, ptr %a13)
418 ; Test spilling the return value of an anyregcc call.
420 ; <rdar://problem/15432754> [JS] Assertion: "Folded a def to a non-store!"
422 ; CHECK-LABEL: .long L{{.*}}-_patchpoint_spilldef
423 ; CHECK-NEXT: .short 0
424 ; CHECK-NEXT: .short 3
425 ; Loc 0: Register (some register that will be spilled to the stack)
426 ; CHECK-NEXT: .byte 1
427 ; CHECK-NEXT: .byte 0
428 ; CHECK-NEXT: .short 8
429 ; CHECK-NEXT: .short {{[0-9]+}}
430 ; CHECK-NEXT: .short 0
431 ; CHECK-NEXT: .long 0
433 ; CHECK-NEXT: .byte 1
434 ; CHECK-NEXT: .byte 0
435 ; CHECK-NEXT: .short 8
436 ; CHECK-NEXT: .short {{[0-9]+}}
437 ; CHECK-NEXT: .short 0
438 ; CHECK-NEXT: .long 0
440 ; CHECK-NEXT: .byte 1
441 ; CHECK-NEXT: .byte 0
442 ; CHECK-NEXT: .short 8
443 ; CHECK-NEXT: .short {{[0-9]+}}
444 ; CHECK-NEXT: .short 0
445 ; CHECK-NEXT: .long 0
446 define i64 @patchpoint_spilldef(i64 %p1, i64 %p2, i64 %p3, i64 %p4) {
448 %result = tail call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 12, i32 16, ptr inttoptr (i64 0 to ptr), i32 2, i64 %p1, i64 %p2)
449 tail call void asm sideeffect "nop", "~{x0},~{x1},~{x2},~{x3},~{x4},~{x5},~{x6},~{x7},~{x8},~{x9},~{x10},~{x11},~{x12},~{x13},~{x14},~{x15},~{x16},~{x17},~{x18},~{x19},~{x20},~{x21},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27},~{x28},~{x29},~{x30},~{x31}"() nounwind
453 ; Test spilling the arguments of an anyregcc call.
455 ; <rdar://problem/15487687> [JS] AnyRegCC argument ends up being spilled
457 ; CHECK-LABEL: .long L{{.*}}-_patchpoint_spillargs
458 ; CHECK-NEXT: .short 0
459 ; CHECK-NEXT: .short 5
460 ; Loc 0: Return a register
461 ; CHECK-NEXT: .byte 1
462 ; CHECK-NEXT: .byte 0
463 ; CHECK-NEXT: .short 8
464 ; CHECK-NEXT: .short {{[0-9]+}}
465 ; CHECK-NEXT: .short 0
466 ; CHECK-NEXT: .long 0
467 ; Loc 1: Arg0 in a Register
468 ; CHECK-NEXT: .byte 1
469 ; CHECK-NEXT: .byte 0
470 ; CHECK-NEXT: .short 8
471 ; CHECK-NEXT: .short {{[0-9]+}}
472 ; CHECK-NEXT: .short 0
473 ; CHECK-NEXT: .long 0
474 ; Loc 2: Arg1 in a Register
475 ; CHECK-NEXT: .byte 1
476 ; CHECK-NEXT: .byte 0
477 ; CHECK-NEXT: .short 8
478 ; CHECK-NEXT: .short {{[0-9]+}}
479 ; CHECK-NEXT: .short 0
480 ; CHECK-NEXT: .long 0
481 ; Loc 3: Arg2 spilled to FP -96
482 ; CHECK-NEXT: .byte 3
483 ; CHECK-NEXT: .byte 0
484 ; CHECK-NEXT: .short 8
485 ; CHECK-NEXT: .short 29
486 ; CHECK-NEXT: .short 0
487 ; CHECK-NEXT: .long -96
488 ; Loc 4: Arg3 spilled to FP - 88
489 ; CHECK-NEXT: .byte 3
490 ; CHECK-NEXT: .byte 0
491 ; CHECK-NEXT: .short 8
492 ; CHECK-NEXT: .short 29
493 ; CHECK-NEXT: .short 0
494 ; CHECK-NEXT: .long -88
495 define i64 @patchpoint_spillargs(i64 %p1, i64 %p2, i64 %p3, i64 %p4) {
497 tail call void asm sideeffect "nop", "~{x0},~{x1},~{x2},~{x3},~{x4},~{x5},~{x6},~{x7},~{x8},~{x9},~{x10},~{x11},~{x12},~{x13},~{x14},~{x15},~{x16},~{x17},~{x18},~{x19},~{x20},~{x21},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27},~{x28},~{x29},~{x30},~{x31}"() nounwind
498 %result = tail call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 13, i32 16, ptr inttoptr (i64 0 to ptr), i32 2, i64 %p1, i64 %p2, i64 %p3, i64 %p4)
503 ; CHECK-LABEL: .long L{{.*}}-_generic_test_i1
504 ; CHECK-NEXT: .short 0
506 ; CHECK-NEXT: .short 1
507 ; Loc 0: Register <-- this is the return register
508 ; CHECK-NEXT: .byte 1
509 ; CHECK-NEXT: .byte 0
510 ; CHECK-NEXT: .short 4
511 ; CHECK-NEXT: .short {{[0-9]+}}
512 ; CHECK-NEXT: .short 0
513 ; CHECK-NEXT: .long 0
514 define i1 @generic_test_i1() nounwind ssp uwtable {
516 %ret = call anyregcc i1 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i1(i64 14, i32 20, ptr null, i32 0)
521 ; CHECK-LABEL: .long L{{.*}}-_generic_test_i8
522 ; CHECK-NEXT: .short 0
524 ; CHECK-NEXT: .short 1
525 ; Loc 0: Register <-- this is the return register
526 ; CHECK-NEXT: .byte 1
527 ; CHECK-NEXT: .byte 0
528 ; CHECK-NEXT: .short 4
529 ; CHECK-NEXT: .short {{[0-9]+}}
530 ; CHECK-NEXT: .short 0
531 ; CHECK-NEXT: .long 0
532 define i8 @generic_test_i8() nounwind ssp uwtable {
534 %ret = call anyregcc i8 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i8(i64 14, i32 20, ptr null, i32 0)
539 ; CHECK-LABEL: .long L{{.*}}-_generic_test_i16
540 ; CHECK-NEXT: .short 0
542 ; CHECK-NEXT: .short 1
543 ; Loc 0: Register <-- this is the return register
544 ; CHECK-NEXT: .byte 1
545 ; CHECK-NEXT: .byte 0
546 ; CHECK-NEXT: .short 4
547 ; CHECK-NEXT: .short {{[0-9]+}}
548 ; CHECK-NEXT: .short 0
549 ; CHECK-NEXT: .long 0
550 define i16 @generic_test_i16() nounwind ssp uwtable {
552 %ret = call anyregcc i16 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i16(i64 14, i32 20, ptr null, i32 0)
557 ; CHECK-LABEL: .long L{{.*}}-_generic_test_i29
558 ; CHECK-NEXT: .short 0
560 ; CHECK-NEXT: .short 1
561 ; Loc 0: Register <-- this is the return register
562 ; CHECK-NEXT: .byte 1
563 ; CHECK-NEXT: .byte 0
564 ; CHECK-NEXT: .short 4
565 ; CHECK-NEXT: .short {{[0-9]+}}
566 ; CHECK-NEXT: .short 0
567 ; CHECK-NEXT: .long 0
568 define i29 @generic_test_i29() nounwind ssp uwtable {
570 %ret = call anyregcc i29 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i29(i64 14, i32 20, ptr null, i32 0)
575 ; CHECK-LABEL: .long L{{.*}}-_generic_test_i32
576 ; CHECK-NEXT: .short 0
578 ; CHECK-NEXT: .short 1
579 ; Loc 0: Register <-- this is the return register
580 ; CHECK-NEXT: .byte 1
581 ; CHECK-NEXT: .byte 0
582 ; CHECK-NEXT: .short 4
583 ; CHECK-NEXT: .short {{[0-9]+}}
584 ; CHECK-NEXT: .short 0
585 ; CHECK-NEXT: .long 0
586 define i32 @generic_test_i32() nounwind ssp uwtable {
588 %ret = call anyregcc i32 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i32(i64 14, i32 20, ptr null, i32 0)
593 ; CHECK-LABEL: .long L{{.*}}-_generic_test_i64
594 ; CHECK-NEXT: .short 0
596 ; CHECK-NEXT: .short 1
597 ; Loc 0: Register <-- this is the return register
598 ; CHECK-NEXT: .byte 1
599 ; CHECK-NEXT: .byte 0
600 ; CHECK-NEXT: .short 8
601 ; CHECK-NEXT: .short {{[0-9]+}}
602 ; CHECK-NEXT: .short 0
603 ; CHECK-NEXT: .long 0
604 define i64 @generic_test_i64() nounwind ssp uwtable {
606 %ret = call anyregcc i64 (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.i64(i64 14, i32 20, ptr null, i32 0)
611 ; CHECK-LABEL: .long L{{.*}}-_generic_test_p0
612 ; CHECK-NEXT: .short 0
614 ; CHECK-NEXT: .short 1
615 ; Loc 0: Register <-- this is the return register
616 ; CHECK-NEXT: .byte 1
617 ; CHECK-NEXT: .byte 0
618 ; CHECK-NEXT: .short 8
619 ; CHECK-NEXT: .short {{[0-9]+}}
620 ; CHECK-NEXT: .short 0
621 ; CHECK-NEXT: .long 0
622 define ptr @generic_test_p0() nounwind ssp uwtable {
624 %ret = call anyregcc ptr (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.p0(i64 14, i32 20, ptr null, i32 0)
629 ; CHECK-LABEL: .long L{{.*}}-_generic_test_f16
630 ; CHECK-NEXT: .short 0
632 ; CHECK-NEXT: .short 1
633 ; Loc 0: Register <-- this is the return register
634 ; CHECK-NEXT: .byte 1
635 ; CHECK-NEXT: .byte 0
636 ; CHECK-NEXT: .short 2
637 ; CHECK-NEXT: .short {{[0-9]+}}
638 ; CHECK-NEXT: .short 0
639 ; CHECK-NEXT: .long 0
640 define half @generic_test_f16() nounwind ssp uwtable {
642 %ret = call anyregcc half (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.f16(i64 14, i32 20, ptr null, i32 0)
647 ; CHECK-LABEL: .long L{{.*}}-_generic_test_f32
648 ; CHECK-NEXT: .short 0
650 ; CHECK-NEXT: .short 1
651 ; Loc 0: Register <-- this is the return register
652 ; CHECK-NEXT: .byte 1
653 ; CHECK-NEXT: .byte 0
654 ; CHECK-NEXT: .short 4
655 ; CHECK-NEXT: .short {{[0-9]+}}
656 ; CHECK-NEXT: .short 0
657 ; CHECK-NEXT: .long 0
658 define float @generic_test_f32() nounwind ssp uwtable {
660 %ret = call anyregcc float (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.f32(i64 14, i32 20, ptr null, i32 0)
665 ; CHECK-LABEL: .long L{{.*}}-_generic_test_f64
666 ; CHECK-NEXT: .short 0
668 ; CHECK-NEXT: .short 1
669 ; Loc 0: Register <-- this is the return register
670 ; CHECK-NEXT: .byte 1
671 ; CHECK-NEXT: .byte 0
672 ; CHECK-NEXT: .short 8
673 ; CHECK-NEXT: .short {{[0-9]+}}
674 ; CHECK-NEXT: .short 0
675 ; CHECK-NEXT: .long 0
676 define double @generic_test_f64() nounwind ssp uwtable {
678 %ret = call anyregcc double (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.f64(i64 14, i32 20, ptr null, i32 0)
683 ; CHECK-LABEL: .long L{{.*}}-_generic_test_v16i8
684 ; CHECK-NEXT: .short 0
686 ; CHECK-NEXT: .short 1
687 ; Loc 0: Register <-- this is the return register
688 ; CHECK-NEXT: .byte 1
689 ; CHECK-NEXT: .byte 0
690 ; CHECK-NEXT: .short 16
691 ; CHECK-NEXT: .short {{[0-9]+}}
692 ; CHECK-NEXT: .short 0
693 ; CHECK-NEXT: .long 0
694 define <16 x i8> @generic_test_v16i8() nounwind ssp uwtable {
696 %ret = call anyregcc <16 x i8> (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.v16i8(i64 14, i32 20, ptr null, i32 0)
701 ; CHECK-LABEL: .long L{{.*}}-_generic_test_v4i32
702 ; CHECK-NEXT: .short 0
704 ; CHECK-NEXT: .short 1
705 ; Loc 0: Register <-- this is the return register
706 ; CHECK-NEXT: .byte 1
707 ; CHECK-NEXT: .byte 0
708 ; CHECK-NEXT: .short 16
709 ; CHECK-NEXT: .short {{[0-9]+}}
710 ; CHECK-NEXT: .short 0
711 ; CHECK-NEXT: .long 0
712 define <4 x i32> @generic_test_v4i32() nounwind ssp uwtable {
714 %ret = call anyregcc <4 x i32> (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.v4i32(i64 14, i32 20, ptr null, i32 0)
719 ; CHECK-LABEL: .long L{{.*}}-_generic_test_v4f32
720 ; CHECK-NEXT: .short 0
722 ; CHECK-NEXT: .short 1
723 ; Loc 0: Register <-- this is the return register
724 ; CHECK-NEXT: .byte 1
725 ; CHECK-NEXT: .byte 0
726 ; CHECK-NEXT: .short 16
727 ; CHECK-NEXT: .short {{[0-9]+}}
728 ; CHECK-NEXT: .short 0
729 ; CHECK-NEXT: .long 0
730 define <4 x float> @generic_test_v4f32() nounwind ssp uwtable {
732 %ret = call anyregcc <4 x float> (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.v4f32(i64 14, i32 20, ptr null, i32 0)
737 ; CHECK-LABEL: .long L{{.*}}-_generic_test_v2f64
738 ; CHECK-NEXT: .short 0
740 ; CHECK-NEXT: .short 1
741 ; Loc 0: Register <-- this is the return register
742 ; CHECK-NEXT: .byte 1
743 ; CHECK-NEXT: .byte 0
744 ; CHECK-NEXT: .short 16
745 ; CHECK-NEXT: .short {{[0-9]+}}
746 ; CHECK-NEXT: .short 0
747 ; CHECK-NEXT: .long 0
748 define <2 x double> @generic_test_v2f64() nounwind ssp uwtable {
750 %ret = call anyregcc <2 x double> (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.v2f64(i64 14, i32 20, ptr null, i32 0)
751 ret <2 x double> %ret
754 declare void @llvm.experimental.patchpoint.void(i64, i32, ptr, i32, ...)
755 declare i32 @llvm.experimental.patchpoint.i32(i64, i32, ptr, i32, ...)
756 declare i64 @llvm.experimental.patchpoint.i64(i64, i32, ptr, i32, ...)
757 declare ptr @llvm.experimental.patchpoint.p0(i64, i32, ptr, i32, ...)
758 declare half @llvm.experimental.patchpoint.f16(i64, i32, ptr, i32, ...)
759 declare float @llvm.experimental.patchpoint.f32(i64, i32, ptr, i32, ...)
760 declare double @llvm.experimental.patchpoint.f64(i64, i32, ptr, i32, ...)
761 declare <16 x i8> @llvm.experimental.patchpoint.v16i8(i64, i32, ptr, i32, ...)
762 declare <4 x i32> @llvm.experimental.patchpoint.v4i32(i64, i32, ptr, i32, ...)
763 declare <4 x float> @llvm.experimental.patchpoint.v4f32(i64, i32, ptr, i32, ...)
764 declare <2 x double> @llvm.experimental.patchpoint.v2f64(i64, i32, ptr, i32, ...)