[PGO] Add a test case covering IR based VP instrumentation

llvm-svn: 258732
This commit is contained in:
Xinliang David Li 2016-01-25 22:33:29 +00:00
parent 19c45e2e12
commit 3aa113321b
1 changed files with 7 additions and 0 deletions

View File

@ -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