diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-08 17:12:57 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-08 17:12:57 +0000 | 
| commit | c46e6a5940c50058e00c0c5f9123fd82e338d29a (patch) | |
| tree | 89a719d723035c54a190b1f81d329834f1f93336 /test/CodeGen/X86/xray-custom-log.ll | |
| parent | 148779df305667b6942fee7e758fdf81a6498f38 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/X86/xray-custom-log.ll')
| -rw-r--r-- | test/CodeGen/X86/xray-custom-log.ll | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/X86/xray-custom-log.ll b/test/CodeGen/X86/xray-custom-log.ll new file mode 100644 index 0000000000000..63625d44b4cb2 --- /dev/null +++ b/test/CodeGen/X86/xray-custom-log.ll @@ -0,0 +1,23 @@ +; RUN: llc -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s + +define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" { +    %eventptr = alloca i8 +    %eventsize = alloca i32 +    store i32 3, i32* %eventsize +    %val = load i32, i32* %eventsize +    call void @llvm.xray.customevent(i8* %eventptr, i32 %val) +    ; CHECK-LABEL: Lxray_event_sled_0: +    ; CHECK-NEXT:  .ascii "\353\024 +    ; CHECK-NEXT:  pushq %rax +    ; CHECK-NEXT:  movq {{.*}}, %rdi +    ; CHECK-NEXT:  movq {{.*}}, %rsi +    ; CHECK-NEXT:  movabsq $__xray_CustomEvent, %rax +    ; CHECK-NEXT:  callq *%rax +    ; CHECK-NEXT:  popq %rax +    ret i32 0 +} +; CHECK:       .section {{.*}}xray_instr_map +; CHECK-LABEL: Lxray_synthetic_0: +; CHECK:       .quad {{.*}}xray_event_sled_0 + +declare void @llvm.xray.customevent(i8*, i32)  | 
