summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/CountingFunctionInserter/mcount.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/CountingFunctionInserter/mcount.ll')
-rw-r--r--llvm/test/Transforms/CountingFunctionInserter/mcount.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/Transforms/CountingFunctionInserter/mcount.ll b/llvm/test/Transforms/CountingFunctionInserter/mcount.ll
new file mode 100644
index 00000000000..88297c7d825
--- /dev/null
+++ b/llvm/test/Transforms/CountingFunctionInserter/mcount.ll
@@ -0,0 +1,27 @@
+; RUN: opt -S -cfinserter < %s | FileCheck %s
+target datalayout = "E-m:e-i64:64-n32:64"
+target triple = "powerpc64-bgq-linux"
+
+define void @test1() #0 {
+entry:
+ ret void
+
+; CHECK-LABEL: define void @test1()
+; CHECK: entry:
+; CHECK-NEXT: call void @mcount()
+; CHECK: ret void
+}
+
+define void @test2() #1 {
+entry:
+ ret void
+
+; CHECK-LABEL: define void @test2()
+; CHECK: entry:
+; CHECK-NEXT: call void @.mcount()
+; CHECK: ret void
+}
+
+attributes #0 = { "counting-function"="mcount" }
+attributes #1 = { "counting-function"=".mcount" }
+
OpenPOWER on IntegriCloud