1 RUN: llvm-profdata merge -o %t.0.profdata %S/Inputs/IR_profile.proftext
2 RUN: llvm-profdata show -o %t.0.proftext -all-functions -text %t.0.profdata
3 RUN: diff -b %t.0.proftext %S/Inputs/IR_profile.proftext
4 RUN: llvm-profdata merge -o %t.1.profdata %t.0.proftext
5 RUN: llvm-profdata show -o %t.1.proftext -all-functions -text %t.1.profdata
6 RUN: diff -b %t.1.proftext %S/Inputs/IR_profile.proftext
7 RUN: llvm-profdata merge --sample --binary -output=%t.2.profdata %S/Inputs/sample-profile.proftext
8 RUN: llvm-profdata merge --sample --text -output=%t.2.proftext %t.2.profdata
9 RUN: diff -b %t.2.proftext %S/Inputs/sample-profile.proftext
10 # Round trip from text --> extbinary --> text
11 RUN: llvm-profdata merge --sample --extbinary -output=%t.3.profdata %S/Inputs/sample-profile.proftext
12 RUN: llvm-profdata merge --sample --text -output=%t.3.proftext %t.3.profdata
13 RUN: diff -b %t.3.proftext %S/Inputs/sample-profile.proftext
14 # Round trip from text --> binary --> extbinary --> text
15 RUN: llvm-profdata merge --sample --binary -output=%t.4.profdata %S/Inputs/sample-profile.proftext
16 RUN: llvm-profdata merge --sample --extbinary -output=%t.5.profdata %t.4.profdata
17 RUN: llvm-profdata merge --sample --text -output=%t.4.proftext %t.5.profdata
18 RUN: diff -b %t.4.proftext %S/Inputs/sample-profile.proftext
19 # Trip from text --> extbinary --> md5text
20 # Trip from text --> compbinary --> md5text
21 # Compare the two md5 texts
22 RUN: llvm-profdata merge --sample --compbinary -output=%t.6.profdata %S/Inputs/sample-profile.proftext
23 RUN: llvm-profdata merge --sample --text -output=%t.6.proftext %t.6.profdata
24 RUN: llvm-profdata merge --sample --extbinary -use-md5 -output=%t.7.profdata %S/Inputs/sample-profile.proftext
25 RUN: llvm-profdata merge --sample --text -output=%t.7.proftext %t.7.profdata
26 RUN: diff -b %t.6.proftext %t.7.proftext