• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
2; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-darwin-unknown    < %s | FileCheck %s
3
4define i32 @callee() nounwind noinline uwtable "function-instrument"="xray-always" {
5; CHECK:       .p2align 1, 0x90
6; CHECK-LABEL: Lxray_sled_0:
7; CHECK:       .ascii "\353\t"
8; CHECK-NEXT:  nopw 512(%rax,%rax)
9  ret i32 0
10; CHECK:       .p2align 1, 0x90
11; CHECK-LABEL: Lxray_sled_1:
12; CHECK:       retq
13; CHECK-NEXT:  nopw %cs:512(%rax,%rax)
14}
15; CHECK-LABEL: xray_instr_map
16; CHECK-LABEL: Lxray_sleds_start0:
17; CHECK:       .quad {{.*}}xray_sled_0
18; CHECK:       .quad {{.*}}xray_sled_1
19; CHECK-LABEL: Lxray_sleds_end0:
20; CHECK-LABEL: xray_fn_idx
21; CHECK:       .quad {{.*}}xray_sleds_start0
22; CHECK-NEXT:  .quad {{.*}}xray_sleds_end0
23
24define i32 @caller() nounwind noinline uwtable "function-instrument"="xray-always" {
25; CHECK:       .p2align 1, 0x90
26; CHECK-LABEL: Lxray_sled_2:
27; CHECK:       .ascii "\353\t"
28; CHECK-NEXT:  nopw 512(%rax,%rax)
29; CHECK:       .p2align 1, 0x90
30; CHECK-LABEL: Lxray_sled_3:
31; CHECK-NEXT:  .ascii "\353\t"
32; CHECK-NEXT:  nopw 512(%rax,%rax)
33  %retval = tail call i32 @callee()
34; CHECK:       jmp {{.*}}callee {{.*}}# TAILCALL
35  ret i32 %retval
36}
37; CHECK-LABEL: xray_instr_map
38; CHECK-LABEL: Lxray_sleds_start1:
39; CHECK:       .quad {{.*}}xray_sled_2
40; CHECK:       .quad {{.*}}xray_sled_3
41; CHECK-LABEL: Lxray_sleds_end1:
42; CHECK-LABEL: xray_fn_idx
43; CHECK:       .quad {{.*}}xray_sleds_start1
44; CHECK:       .quad {{.*}}xray_sleds_end1
45