blob: 0a3da5b852c12ea633617fe49e865f341cd86d98 [file] [log] [blame]
Teresa Johnson91a88bb2015-10-19 14:30:44 +00001; Test combined function index generation for ThinLTO via llvm-lto.
2; RUN: llvm-as -function-summary %s -o %t.o
3; RUN: llvm-as -function-summary %p/Inputs/thinlto.ll -o %t2.o
4; RUN: llvm-lto -thinlto -o %t3 %t.o %t2.o
5; RUN: llvm-bcanalyzer -dump %t3.thinlto.bc | FileCheck %s --check-prefix=COMBINED
6; RUN: not test -e %t3
7
8; COMBINED: <MODULE_STRTAB_BLOCK
Teresa Johnsonbd715d42015-10-19 15:19:02 +00009; COMBINED-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp{{.*}}.o'
10; COMBINED-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp{{.*}}.o'
Teresa Johnson91a88bb2015-10-19 14:30:44 +000011; COMBINED-NEXT: </MODULE_STRTAB_BLOCK
12; COMBINED-NEXT: <FUNCTION_SUMMARY_BLOCK
13; COMBINED-NEXT: <COMBINED_ENTRY
14; COMBINED-NEXT: <COMBINED_ENTRY
15; COMBINED-NEXT: </FUNCTION_SUMMARY_BLOCK
16; COMBINED-NEXT: <VALUE_SYMTAB
Teresa Johnsone1164de2016-02-10 21:55:02 +000017; Check that the format is: op0=offset, op1=funcguid, where funcguid is
18; the lower 64 bits of the function name MD5.
19; COMBINED-NEXT: <COMBINED_FNENTRY abbrevid={{[0-9]+}} op0={{[0-9]+}} op1={{-3706093650706652785|-5300342847281564238}}
20; COMBINED-NEXT: <COMBINED_FNENTRY abbrevid={{[0-9]+}} op0={{[0-9]+}} op1={{-3706093650706652785|-5300342847281564238}}
Teresa Johnson91a88bb2015-10-19 14:30:44 +000021; COMBINED-NEXT: </VALUE_SYMTAB
22
23define void @f() {
24entry:
25 ret void
26}