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