diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:45:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:45:36 +0000 |
commit | 6f08730ec5f639f05f2f15354171e4a3c9af9dc1 (patch) | |
tree | 7374e9d4448083010ada98d17976199c7e945d47 /test/profile/instrprof-basic.c | |
parent | c003a57e2e4a1ad9be0338806bc1038b6987155f (diff) | |
download | src-6f08730ec5f639f05f2f15354171e4a3c9af9dc1.tar.gz src-6f08730ec5f639f05f2f15354171e4a3c9af9dc1.zip |
Vendor import of compiler-rt release_39 branch r276489:vendor/compiler-rt/compiler-rt-release_39-r276489
Notes
Notes:
svn path=/vendor/compiler-rt/dist/; revision=303235
svn path=/vendor/compiler-rt/compiler-rt-release_39-r276489/; revision=303236; tag=vendor/compiler-rt/compiler-rt-release_39-r276489
Diffstat (limited to 'test/profile/instrprof-basic.c')
-rw-r--r-- | test/profile/instrprof-basic.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/test/profile/instrprof-basic.c b/test/profile/instrprof-basic.c index 995525bf9553..02549e1506ba 100644 --- a/test/profile/instrprof-basic.c +++ b/test/profile/instrprof-basic.c @@ -1,17 +1,31 @@ +// REQUIRES: shell // RUN: %clang_profgen -o %t -O3 %s // RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t // RUN: llvm-profdata merge -o %t.profdata %t.profraw -// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s +// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s --check-prefix=COMMON --check-prefix=ORIG +// +// RUN: rm -f %t.profraw_e_* +// RUN: env LLVM_PROFILE_FILE=%t.profraw_e_%1m %run %t +// RUN: env LLVM_PROFILE_FILE=%t.profraw_e_%1m %run %t +// RUN: llvm-profdata merge -o %t.em.profdata %t.profraw_e_* +// RUN: %clang_profuse=%t.em.profdata -o - -S -emit-llvm %s | FileCheck %s --check-prefix=COMMON --check-prefix=MERGE +// +// RUN: %clang_profgen=%t.%m.profraw -o %t.merge -O3 %s +// RUN: rm -f %t.*.profraw* +// RUN: %run %t.merge +// RUN: %run %t.merge +// RUN: llvm-profdata merge -o %t.m.profdata %t.*.profraw +// RUN: %clang_profuse=%t.m.profdata -o - -S -emit-llvm %s | FileCheck %s --check-prefix=COMMON --check-prefix=MERGE int begin(int i) { - // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD1:[0-9]+]] + // COMMON: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD1:[0-9]+]] if (i) return 0; return 1; } int end(int i) { - // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD2:[0-9]+]] + // COMMON: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD2:[0-9]+]] if (i) return 0; return 1; @@ -21,11 +35,13 @@ int main(int argc, const char *argv[]) { begin(0); end(1); - // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD2:[0-9]+]] + // COMMON: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD2:[0-9]+]] if (argc) return 0; return 1; } -// CHECK: ![[PD1]] = !{!"branch_weights", i32 1, i32 2} -// CHECK: ![[PD2]] = !{!"branch_weights", i32 2, i32 1} +// ORIG: ![[PD1]] = !{!"branch_weights", i32 1, i32 2} +// ORIG: ![[PD2]] = !{!"branch_weights", i32 2, i32 1} +// MERGE: ![[PD1]] = !{!"branch_weights", i32 1, i32 3} +// MERGE: ![[PD2]] = !{!"branch_weights", i32 3, i32 1} |