1 ; RUN: llc < %s | FileCheck %s
2 ; RUN: llc -debug-only=stackmaps < %s 2>&1 | FileCheck --check-prefix=STACKMAPS %s
5 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-apple-macosx10.11.0"
8 declare i32 @llvm.experimental.deoptimize.i32(...)
9 declare i8 @llvm.experimental.deoptimize.i8(...)
11 define i32 @caller_0() {
12 ; CHECK-LABEL: _caller_0:
13 ; CHECK-NEXT: {{.+cfi.+}}
14 ; CHECK-NEXT: ##{{.+}}
15 ; CHECK-NEXT: pushq %rax
16 ; CHECK-NEXT: {{.+cfi.+}}
17 ; CHECK-NEXT: callq ___llvm_deoptimize
18 ; CHECK-NEXT: {{Ltmp[0-9]+}}:
20 %v = call i32(...) @llvm.experimental.deoptimize.i32() [ "deopt"(i32 0) ]
24 define i8 @caller_1() {
25 ; CHECK-LABEL: _caller_1:
26 ; CHECK-NEXT: {{.+cfi.+}}
27 ; CHECK-NEXT: ##{{.+}}
28 ; CHECK-NEXT: pushq %rax
29 ; CHECK-NEXT: {{.+cfi.+}}
30 ; CHECK-NEXT: movss {{[a-zA-Z0-9_]+}}(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
31 ; CHECK-NEXT: movl $42, %edi
32 ; CHECK-NEXT: callq ___llvm_deoptimize
33 ; CHECK-NEXT: {{Ltmp[0-9]+}}:
36 %v = call i8(...) @llvm.experimental.deoptimize.i8(i32 42, float 500.0) [ "deopt"(i32 1) ]
40 ; STACKMAPS: Stack Maps: callsites:
41 ; STACKMAPS-NEXT: Stack Maps: callsite 2882400015
42 ; STACKMAPS-NEXT: Stack Maps: has 4 locations
43 ; STACKMAPS-NEXT: Stack Maps: Loc 0: Constant 0 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 0]
44 ; STACKMAPS-NEXT: Stack Maps: Loc 1: Constant 0 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 0]
45 ; STACKMAPS-NEXT: Stack Maps: Loc 2: Constant 1 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 1]
46 ; STACKMAPS-NEXT: Stack Maps: Loc 3: Constant 0 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 0]
47 ; STACKMAPS-NEXT: Stack Maps: has 0 live-out registers
48 ; STACKMAPS-NEXT: Stack Maps: callsite 2882400015
49 ; STACKMAPS-NEXT: Stack Maps: has 4 locations
50 ; STACKMAPS-NEXT: Stack Maps: Loc 0: Constant 0 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 0]
51 ; STACKMAPS-NEXT: Stack Maps: Loc 1: Constant 0 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 0]
52 ; STACKMAPS-NEXT: Stack Maps: Loc 2: Constant 1 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 1]
53 ; STACKMAPS-NEXT: Stack Maps: Loc 3: Constant 1 [encoding: .byte 4, .byte 0, .short 8, .short 0, .short 0, .int 1]
54 ; STACKMAPS-NEXT: Stack Maps: has 0 live-out registers