From 59977c238a3e89eecde3181129f407644cb0f07f Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 10 May 2016 22:01:20 +0000 Subject: Reapply r268608 after IR instr bug fix git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269130 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/profile/Inputs/instrprof-value-prof-real.c | 1 + test/profile/instrprof-value-prof-shared.test | 1 + test/profile/instrprof-value-prof.test | 7 ++++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/profile/Inputs/instrprof-value-prof-real.c b/test/profile/Inputs/instrprof-value-prof-real.c index a87332451..7893b90d4 100644 --- a/test/profile/Inputs/instrprof-value-prof-real.c +++ b/test/profile/Inputs/instrprof-value-prof-real.c @@ -53,6 +53,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-shared.test b/test/profile/instrprof-value-prof-shared.test index 9b0ebf539..11050a28f 100644 --- a/test/profile/instrprof-value-prof-shared.test +++ b/test/profile/instrprof-value-prof-shared.test @@ -14,3 +14,4 @@ // 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: llvm-profdata show --all-functions -ic-targets %t.ir.profdata | FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=SHARED +// RUN: FileCheck %S/Inputs/instrprof-value-prof-real.c --check-prefix=IR < %t.ir.proftxt 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 -- cgit v1.2.3