blob: ee00da238c2c07d85dc2d0cc0008ab56bd623bf4 [file] [log] [blame]
Teresa Johnson91a88bb2015-10-19 14:30:44 +00001; Test combined function index generation for ThinLTO via llvm-lto.
Mehdi Amini68da4262016-04-12 21:35:18 +00002; RUN: opt -module-summary %s -o %t.o
3; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
Teresa Johnson91a88bb2015-10-19 14:30:44 +00004; 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
Teresa Johnson76a1c1d2016-03-11 18:52:24 +000012; COMBINED-NEXT: <GLOBALVAL_SUMMARY_BLOCK
Mehdi Amini8fe69362016-04-24 03:18:11 +000013; COMBINED-NEXT: <VERSION
Teresa Johnson76a1c1d2016-03-11 18:52:24 +000014; COMBINED-NEXT: <COMBINED
15; COMBINED-NEXT: <COMBINED
16; COMBINED-NEXT: </GLOBALVAL_SUMMARY_BLOCK
Teresa Johnson91a88bb2015-10-19 14:30:44 +000017; COMBINED-NEXT: <VALUE_SYMTAB
Teresa Johnson76a1c1d2016-03-11 18:52:24 +000018; Check that the format is: op0=valueid, op1=offset, op2=funcguid,
19; where funcguid is the lower 64 bits of the function name MD5.
20; COMBINED-NEXT: <COMBINED_GVDEFENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{[0-9]+}} op2={{-3706093650706652785|-5300342847281564238}}
21; COMBINED-NEXT: <COMBINED_GVDEFENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{[0-9]+}} op2={{-3706093650706652785|-5300342847281564238}}
Teresa Johnson91a88bb2015-10-19 14:30:44 +000022; COMBINED-NEXT: </VALUE_SYMTAB
23
24define void @f() {
25entry:
26 ret void
27}