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 - \
3 ; RUN: -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
5 define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {
7 %eventsize = alloca i32
8 store i32 3, i32* %eventsize
9 %val = load i32, i32* %eventsize
10 call void @llvm.xray.customevent(i8* %eventptr, i32 %val)
11 ; CHECK-LABEL: Lxray_event_sled_0:
12 ; CHECK: .byte 0xeb, 0x0f
13 ; CHECK-NEXT: pushq %rdi
14 ; CHECK-NEXT: pushq %rsi
15 ; CHECK-NEXT: movq {{.*}}, %rdi
16 ; CHECK-NEXT: movq {{.*}}, %rsi
17 ; CHECK-NEXT: callq __xray_CustomEvent
18 ; CHECK-NEXT: popq %rsi
19 ; CHECK-NEXT: popq %rdi
21 ; PIC-LABEL: Lxray_event_sled_0:
22 ; PIC: .byte 0xeb, 0x0f
23 ; PIC-NEXT: pushq %rdi
24 ; PIC-NEXT: pushq %rsi
25 ; PIC-NEXT: movq {{.*}}, %rdi
26 ; PIC-NEXT: movq {{.*}}, %rsi
27 ; PIC-NEXT: callq __xray_CustomEvent@PLT
32 ; CHECK-LABEL: xray_instr_map
33 ; CHECK-LABEL: Lxray_sleds_start0:
34 ; CHECK: .quad {{.*}}xray_event_sled_0
36 declare void @llvm.xray.customevent(i8*, i32)