summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/xray-log-args.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/xray-log-args.ll')
-rw-r--r--test/CodeGen/X86/xray-log-args.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/CodeGen/X86/xray-log-args.ll b/test/CodeGen/X86/xray-log-args.ll
new file mode 100644
index 0000000000000..a551868ffb4a7
--- /dev/null
+++ b/test/CodeGen/X86/xray-log-args.ll
@@ -0,0 +1,35 @@
+; When logging arguments is specified, emit the entry sled accordingly.
+
+; RUN: llc -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc -filetype=asm -o - -mtriple=x86_64-darwin-unknown < %s | FileCheck %s
+
+define i32 @callee(i32 %arg) nounwind noinline uwtable "function-instrument"="xray-always" "xray-log-args"="1" {
+ ret i32 %arg
+}
+; CHECK-LABEL: Lxray_synthetic_0:
+; CHECK: .quad {{\.?}}Lxray_sled_0
+; CHECK: .quad {{_?}}callee
+; CHECK: .byte 3
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
+; CHECK: .quad {{\.?}}Lxray_sled_1
+; CHECK: .quad {{_?}}callee
+; CHECK: .byte 1
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
+
+define i32 @caller(i32 %arg) nounwind noinline uwtable "function-instrument"="xray-always" "xray-log-args"="1" {
+ %retval = tail call i32 @callee(i32 %arg)
+ ret i32 %retval
+}
+; CHECK-LABEL: Lxray_synthetic_1:
+; CHECK: .quad {{\.?}}Lxray_sled_2
+; CHECK: .quad {{_?}}caller
+; CHECK: .byte 3
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14
+; CHECK: .quad {{\.?}}Lxray_sled_3
+; CHECK: .quad {{_?}}caller
+; CHECK: .byte 2
+; CHECK: .byte 1
+; CHECK: .{{(zero|space)}} 14