summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2016-09-08 00:19:04 +0000
committerDean Michael Berris <dberris@google.com>2016-09-08 00:19:04 +0000
commit17d94e279e43c02833628a455a97d78cd8aafb5e (patch)
tree0d31e55bdef4a64dc547dc93d19bec12c607ce5a /llvm/test/CodeGen
parent6b96c15b83d3249f7cc7ebf0075a41d9e95a1add (diff)
downloadbcm5719-llvm-17d94e279e43c02833628a455a97d78cd8aafb5e.tar.gz
bcm5719-llvm-17d94e279e43c02833628a455a97d78cd8aafb5e.zip
[XRay] ARM 32-bit no-Thumb support in LLVM
This is a port of XRay to ARM 32-bit, without Thumb support yet. The XRay instrumentation support is moving up to AsmPrinter. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: 1. https://reviews.llvm.org/D23932 (Clang test) 2. https://reviews.llvm.org/D23933 (compiler-rt) Differential Revision: https://reviews.llvm.org/D23931 llvm-svn: 280888
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll24
-rw-r--r--llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll24
2 files changed, 48 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
new file mode 100644
index 00000000000..c89c21e44a9
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll
@@ -0,0 +1,24 @@
+; RUN: llc -filetype=asm -o - -mtriple=armv6-unknown-linux-gnu < %s | FileCheck %s
+
+define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
+; CHECK-LABEL: Lxray_sled_0:
+; CHECK-NEXT: b #20
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-LABEL: Ltmp0:
+ ret i32 0
+; CHECK-LABEL: Lxray_sled_1:
+; CHECK-NEXT: b #20
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-NEXT: mov r0, r0
+; CHECK-LABEL: Ltmp1:
+; CHECK-NEXT: bx lr
+}
diff --git a/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll
new file mode 100644
index 00000000000..842d9bc2a56
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll
@@ -0,0 +1,24 @@
+; RUN: llc -filetype=asm -o - -mtriple=armv7-unknown-linux-gnu < %s | FileCheck %s
+
+define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
+; CHECK-LABEL: Lxray_sled_0:
+; CHECK-NEXT: b #20
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-LABEL: Ltmp0:
+ ret i32 0
+; CHECK-LABEL: Lxray_sled_1:
+; CHECK-NEXT: b #20
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-NEXT: nop
+; CHECK-LABEL: Ltmp1:
+; CHECK-NEXT: bx lr
+}
OpenPOWER on IntegriCloud