aboutsummaryrefslogtreecommitdiff
path: root/test/profile/instrprof-value-prof.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/profile/instrprof-value-prof.c')
-rw-r--r--test/profile/instrprof-value-prof.c164
1 files changed, 68 insertions, 96 deletions
diff --git a/test/profile/instrprof-value-prof.c b/test/profile/instrprof-value-prof.c
index 3ccecbe75593..f09e1ac432f1 100644
--- a/test/profile/instrprof-value-prof.c
+++ b/test/profile/instrprof-value-prof.c
@@ -6,9 +6,7 @@
// RUN: llvm-profdata merge -o %t-merged.profdata %t.profraw %t-2.profdata
// RUN: llvm-profdata show --all-functions -ic-targets %t-2.profdata | FileCheck %s -check-prefix=NO-VALUE
// RUN: llvm-profdata show --all-functions -ic-targets %t.profdata | FileCheck %s
-// value profile merging current do sorting based on target values -- this will destroy the order of the target
-// in the list leading to comparison problem. For now just check a small subset of output.
-// RUN: llvm-profdata show --all-functions -ic-targets %t-merged.profdata | FileCheck %s -check-prefix=MERGE
+// RUN: llvm-profdata show --all-functions -ic-targets %t-merged.profdata | FileCheck %s
//
// RUN: env LLVM_PROFILE_FILE=%t-3.profraw LLVM_VP_BUFFER_SIZE=1 %run %t 1
// RUN: env LLVM_PROFILE_FILE=%t-4.profraw LLVM_VP_BUFFER_SIZE=8 %run %t 1
@@ -126,128 +124,102 @@ int main(int argc, const char *argv[]) {
// NO-VALUE: Indirect Call Site Count: 127
// NO-VALUE-NEXT: Indirect Target Results:
-// MERGE-LABEL: caller_1_1_1_1_2_2_1:
-// MERGE: Indirect Call Site Count: 6
-// MERGE: Indirect Target Results:
-// MERGE: [ 1, callee_1_1_1, 1 ]
-// MERGE: [ 2, callee_1_1_1, 1 ]
-// MERGE: [ 2, callee_1_1_2, 2 ]
-// MERGE: [ 3, callee_1_1_1, 1 ]
-// MERGE: [ 3, callee_1_1_2, 2 ]
-// MERGE: [ 3, callee_1_2_1, 3 ]
-// MERGE: [ 4, callee_1_1_1, 1 ]
-// MERGE: [ 4, callee_1_1_2, 2 ]
-// MERGE: [ 4, callee_1_2_1, 3 ]
-// MERGE: [ 4, callee_1_2_2, 4 ]
-// MERGE: [ 5, callee_1_1_1, 1 ]
-// MERGE: [ 5, callee_1_1_2, 2 ]
-// MERGE: [ 5, callee_1_2_1, 3 ]
-// MERGE: [ 5, callee_1_2_2, 4 ]
-// MERGE: [ 5, callee_2_1_1, 5 ]
-// MERGE-LABEL: caller_2_2_2_2_2_2_2:
-// MERGE: Indirect Call Site Count: 127
-// MERGE-NEXT: Indirect Target Results:
-// MERGE-NEXT: [ 1, callee_1_1_1, 1 ]
-// MERGE: [ 2, callee_1_1_1, 1 ]
-// MERGE: [ 2, callee_1_1_2, 2 ]
-// MERGE: [ 3, callee_1_1_1, 1 ]
-// MERGE: [ 3, callee_1_1_2, 2 ]
-// MERGE: [ 3, callee_1_2_1, 3 ]
// CHECK-LABEL: caller_1_1_1_1_2_2_1:
// CHECK: Indirect Call Site Count: 6
// CHECK-NEXT: Indirect Target Results:
// CHECK-NEXT: [ 1, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 2, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 2, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 3, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 3, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 2, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 3, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 4, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 4, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 4, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 3, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 3, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 4, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 5, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 5, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 5, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 5, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 4, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 4, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 4, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 5, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 5, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 5, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 5, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 5, callee_1_1_1, 1 ]
// CHECK-LABEL: caller_2_2_2_2_2_2_2:
// CHECK: Indirect Call Site Count: 127
// CHECK-NEXT: Indirect Target Results:
// CHECK-NEXT: [ 1, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 2, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 2, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 3, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 3, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 2, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 3, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 4, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 4, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 4, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 3, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 3, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 4, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 5, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 5, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 5, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 5, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 4, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 4, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 4, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 5, callee_2_1_1, 5 ]
-// CHECK-NEXT: [ 6, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 6, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 6, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 6, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 6, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 5, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 5, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 5, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 5, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 6, callee_2_1_2, 6 ]
-// CHECK-NEXT: [ 7, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 7, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 7, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 7, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 7, callee_2_1_1, 5 ]
-// CHECK-NEXT: [ 7, callee_2_1_2, 6 ]
+// CHECK-NEXT: [ 6, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 6, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 6, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 6, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 6, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 7, callee_2_2_1, 7 ]
+// CHECK-NEXT: [ 7, callee_2_1_2, 6 ]
+// CHECK-NEXT: [ 7, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 7, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 7, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 7, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 7, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 9, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 10, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 10, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 11, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 11, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 10, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 11, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 12, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 12, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 12, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 11, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 11, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 12, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 13, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 13, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 13, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 13, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 12, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 12, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 12, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 13, callee_2_1_1, 5 ]
-// CHECK-NEXT: [ 14, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 14, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 14, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 14, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 14, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 13, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 13, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 13, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 13, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 14, callee_2_1_2, 6 ]
-// CHECK-NEXT: [ 15, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 15, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 15, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 15, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 15, callee_2_1_1, 5 ]
-// CHECK-NEXT: [ 15, callee_2_1_2, 6 ]
+// CHECK-NEXT: [ 14, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 14, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 14, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 14, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 14, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 15, callee_2_2_1, 7 ]
+// CHECK-NEXT: [ 15, callee_2_1_2, 6 ]
+// CHECK-NEXT: [ 15, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 15, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 15, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 15, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 15, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 17, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 18, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 18, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 19, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 19, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 18, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 19, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 20, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 20, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 20, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 19, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 19, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 20, callee_1_2_2, 4 ]
-// CHECK-NEXT: [ 21, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 21, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 21, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 21, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 20, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 20, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 20, callee_1_1_1, 1 ]
// CHECK-NEXT: [ 21, callee_2_1_1, 5 ]
-// CHECK-NEXT: [ 22, callee_1_1_1, 1 ]
-// CHECK-NEXT: [ 22, callee_1_1_2, 2 ]
-// CHECK-NEXT: [ 22, callee_1_2_1, 3 ]
-// CHECK-NEXT: [ 22, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 21, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 21, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 21, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 21, callee_1_1_1, 1 ]
+// CHECK-NEXT: [ 22, callee_2_1_2, 6 ]
// CHECK-NEXT: [ 22, callee_2_1_1, 5 ]
+// CHECK-NEXT: [ 22, callee_1_2_2, 4 ]
+// CHECK-NEXT: [ 22, callee_1_2_1, 3 ]
+// CHECK-NEXT: [ 22, callee_1_1_2, 2 ]
+// CHECK-NEXT: [ 22, callee_1_1_1, 1 ]