blob: 61c52b33e72e81fbe38f6e844c5dba8f51de9bcb [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.
Teresa Johnson02e98332016-04-27 13:28:35 +000020; COMBINED-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
21; COMBINED-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
Teresa Johnson91a88bb2015-10-19 14:30:44 +000022; COMBINED-NEXT: </VALUE_SYMTAB
23
Davide Italiano2ceb6282016-12-14 21:57:04 +000024target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
25
Teresa Johnson91a88bb2015-10-19 14:30:44 +000026define void @f() {
27entry:
28 ret void
29}