summaryrefslogtreecommitdiff
path: root/test/profile/instrprof-value-prof.test
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-01-25 22:33:29 +0000
committerXinliang David Li <davidxl@google.com>2016-01-25 22:33:29 +0000
commit3dc9d939b3336074eda10a0f227eb0199312a62a (patch)
treef1101d1851ae7c7891f3912c1f9a18d9d7b59a39 /test/profile/instrprof-value-prof.test
parent1be90fe31d48a190d226d5576a7716f1ef20dd0d (diff)
[PGO] Add a test case covering IR based VP instrumentation
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258732 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile/instrprof-value-prof.test')
-rw-r--r--test/profile/instrprof-value-prof.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/profile/instrprof-value-prof.test b/test/profile/instrprof-value-prof.test
index f050cd657..53cb5f4aa 100644
--- a/test/profile/instrprof-value-prof.test
+++ b/test/profile/instrprof-value-prof.test
@@ -2,3 +2,10 @@
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// 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_profgen -O2 -mllvm -disable-vp=false -mllvm -profile-generate=%t.ir.profraw -c -o %t.ir.o %S/Inputs/instrprof-value-prof-real.c
+// RUN: %clang_profgen -O2 -fprofile-instr-generate -o %t.ir %t.ir.o
+// RUN: %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