summaryrefslogtreecommitdiff
path: root/test/profile/instrprof-value-prof.test
blob: 4040ef3678111e6ce83d4bcde042ba69b1f9b60f (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang_profgen -O2 -mllvm -enable-value-profiling=true -o %t %S/Inputs/instrprof-value-prof-real.c
// 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 -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
// 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