1 ; RUN: llc -mtriple=aarch64-linux-gnu < %s | FileCheck %s --check-prefixes=CHECK,CHECK-LINUX
2 ; RUN: llc -mtriple=aarch64-apple-darwin < %s | FileCheck %s --check-prefixes=CHECK,CHECK-MACOS
4 define i32 @callee() nounwind noinline uwtable "function-instrument"="xray-always" {
6 ; CHECK-LABEL: Lxray_sled_0:
9 ; CHECK-NEXT: Ltmp[[#]]:
11 ; CHECK-NEXT: mov w0, wzr
12 ; CHECK-NEXT: .p2align 2
13 ; CHECK-LABEL: Lxray_sled_1:
16 ; CHECK-NEXT: Ltmp[[#]]:
20 ; CHECK-LINUX-LABEL: .section xray_instr_map,"ao",@progbits,callee{{$}}
21 ; CHECK-LINUX-LABEL: .Lxray_sleds_start0:
22 ; CHECK-LINUX-NEXT: [[TMP:.Ltmp[0-9]+]]:
23 ; CHECK-LINUX: .xword .Lxray_sled_0-[[TMP]]
24 ; CHECK-LINUX: [[TMP:.Ltmp[0-9]+]]:
25 ; CHECK-LINUX-NEXT: .xword .Lxray_sled_1-[[TMP]]
26 ; CHECK-LINUX-LABEL: Lxray_sleds_end0:
27 ; CHECK-LINUX-LABEL: .section xray_fn_idx,"ao",@progbits,callee{{$}}
28 ; CHECK-LINUX: .xword .Lxray_sleds_start0
29 ; CHECK-LINUX-NEXT: .xword 2
31 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}}
32 ; CHECK-MACOS-LABEL: lxray_sleds_start0:
33 ; CHECK-MACOS-NEXT: [[TMP:Ltmp[0-9]+]]:
34 ; CHECK-MACOS: .quad Lxray_sled_0-[[TMP]]
35 ; CHECK-MACOS: [[TMP:Ltmp[0-9]+]]:
36 ; CHECK-MACOS-NEXT: .quad Lxray_sled_1-[[TMP]]
37 ; CHECK-MACOS-LABEL: Lxray_sleds_end0:
38 ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}}
39 ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]:
40 ; CHECK-MACOS-NEXT: .quad lxray_sleds_start0-[[IDX]]
41 ; CHECK-MACOS-NEXT: .quad 2
43 define i32 @caller() nounwind noinline uwtable "function-instrument"="xray-always" {
45 ; CHECK-LABEL: Lxray_sled_2:
48 ; CHECK-NEXT: Ltmp[[#]]:
50 ; CHECK-LABEL: Lxray_sled_3:
53 ; CHECK-NEXT: Ltmp[[#]]:
54 %retval = tail call i32 @callee()
55 ; CHECK-LINUX: b callee
56 ; CHECK-MACOS: b _callee
60 ; CHECK-LINUX-LABEL: .section xray_instr_map,"ao",@progbits,caller{{$}}
61 ; CHECK-LINUX-LABEL: Lxray_sleds_start1:
62 ; CHECK-LINUX: .xword .Lxray_sled_2
63 ; CHECK-LINUX: .xword .Lxray_sled_3
64 ; CHECK-LINUX-LABEL: Lxray_sleds_end1:
65 ; CHECK-LINUX-LABEL: .section xray_fn_idx,"ao",@progbits,caller{{$}}
66 ; CHECK-LINUX: [[IDX:\.Lxray_fn_idx[0-9]+]]:
67 ; CHECK-LINUX-NEXT: .xword .Lxray_sleds_start1-[[IDX]]
68 ; CHECK-LINUX-NEXT: .xword 2
70 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}}
71 ; CHECK-MACOS-LABEL: lxray_sleds_start1:
72 ; CHECK-MACOS: .quad Lxray_sled_2
73 ; CHECK-MACOS: .quad Lxray_sled_3
74 ; CHECK-MACOS-LABEL: Lxray_sleds_end1:
75 ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}}
76 ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]:
77 ; CHECK-MACOS-NEXT: .quad lxray_sleds_start1-[[IDX]]
78 ; CHECK-MACOS-NEXT: .quad 2