summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-05-05 05:41:02 +0000
committerXinliang David Li <davidxl@google.com>2016-05-05 05:41:02 +0000
commitb98905c60bf9a84e91bd2790d097ad917839a055 (patch)
treed3f352dc274d3d40d8ca87f0e6cea19aa831d1aa /test
parent7c0ae53c515113cbbb7aab6cd3b16fb1ebb9e8d5 (diff)
IR value profile testing cleanup
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/profile/Inputs/instrprof-value-prof-real.c2
-rw-r--r--test/profile/instrprof-value-prof.test7
2 files changed, 5 insertions, 4 deletions
diff --git a/test/profile/Inputs/instrprof-value-prof-real.c b/test/profile/Inputs/instrprof-value-prof-real.c
index fe82b376a..5c44da071 100644
--- a/test/profile/Inputs/instrprof-value-prof-real.c
+++ b/test/profile/Inputs/instrprof-value-prof-real.c
@@ -43,7 +43,7 @@ int main() {
return 0;
}
-
+// IR: :ir
// CHECK-LABEL: main:
// CHECK: [ 0, foo_1_1_1_1_1_1_1_1_1, 1000 ]
// CHECK-NEXT: [ 0, foo_1_1_1_1_1_1_1_1_2, 999 ]
diff --git a/test/profile/instrprof-value-prof.test b/test/profile/instrprof-value-prof.test
index 4040ef367..76cf1bae3 100644
--- a/test/profile/instrprof-value-prof.test
+++ b/test/profile/instrprof-value-prof.test
@@ -3,9 +3,10 @@
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c
-// do two step build before the clang option is ready
-// RUN: %clang -O2 -mllvm -disable-vp=false -Xclang -fprofile-instrument=llvm -c -o %t.ir.o %S/Inputs/instrprof-value-prof-real.c
-// RUN: %clang_profgen -O2 -o %t.ir %t.ir.o
+// IR level instrumentation
+// RUN: %clang_profgen -O2 -mllvm -disable-vp=false -Xclang -fprofile-instrument=llvm -o %t.ir %S/Inputs/instrprof-value-prof-real.c
// RUN: env LLVM_PROFILE_FILE=%t.ir.profraw %run %t.ir
// RUN: llvm-profdata merge -o %t.ir.profdata %t.ir.profraw
// RUN: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c
+// RUN: llvm-profdata merge -text %t.ir.profdata -o %t.ir.proftxt
+// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.proftxt