1*9880d681SAndroid Build Coastguard Worker; RUN: opt -module-summary %s -o %t1.bc 2*9880d681SAndroid Build Coastguard Worker; RUN: opt -module-summary %p/Inputs/distributed_indexes.ll -o %t2.bc 3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc %t2.bc 4*9880d681SAndroid Build Coastguard Worker; RUN: llvm-lto -thinlto-action=distributedindexes -thinlto-index %t.index.bc %t1.bc %t2.bc 5*9880d681SAndroid Build Coastguard Worker; RUN: llvm-bcanalyzer -dump %t1.bc.thinlto.bc | FileCheck %s --check-prefix=BACKEND1 6*9880d681SAndroid Build Coastguard Worker; RUN: llvm-bcanalyzer -dump %t2.bc.thinlto.bc | FileCheck %s --check-prefix=BACKEND2 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; The backend index for this module contains summaries from itself and 9*9880d681SAndroid Build Coastguard Worker; Inputs/distributed_indexes.ll, as it imports from the latter. 10*9880d681SAndroid Build Coastguard Worker; BACKEND1: <MODULE_STRTAB_BLOCK 11*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}distributed_indexes.ll.tmp{{.*}}.bc' 12*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}distributed_indexes.ll.tmp{{.*}}.bc' 13*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: </MODULE_STRTAB_BLOCK 14*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <GLOBALVAL_SUMMARY_BLOCK 15*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <VERSION 16*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <COMBINED 17*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <COMBINED 18*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: </GLOBALVAL_SUMMARY_BLOCK 19*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <VALUE_SYMTAB 20*9880d681SAndroid Build Coastguard Worker; Check that the format is: op0=valueid, op1=offset, op2=funcguid, 21*9880d681SAndroid Build Coastguard Worker; where funcguid is the lower 64 bits of the function name MD5. 22*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}} 23*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}} 24*9880d681SAndroid Build Coastguard Worker; BACKEND1-NEXT: </VALUE_SYMTAB 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker; The backend index for Input/distributed_indexes.ll contains summaries from 27*9880d681SAndroid Build Coastguard Worker; itself only, as it does not import anything. 28*9880d681SAndroid Build Coastguard Worker; BACKEND2: <MODULE_STRTAB_BLOCK 29*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: <ENTRY {{.*}} record string = '{{.*}}distributed_indexes.ll.tmp2.bc' 30*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: </MODULE_STRTAB_BLOCK 31*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK 32*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: <VERSION 33*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: <COMBINED 34*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK 35*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: <VALUE_SYMTAB 36*9880d681SAndroid Build Coastguard Worker; Check that the format is: op0=valueid, op1=offset, op2=funcguid, 37*9880d681SAndroid Build Coastguard Worker; where funcguid is the lower 64 bits of the function name MD5. 38*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: <COMBINED_ENTRY abbrevid={{[0-9]+}} op0=1 op1=-5300342847281564238 39*9880d681SAndroid Build Coastguard Worker; BACKEND2-NEXT: </VALUE_SYMTAB 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Workerdeclare void @g(...) 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Workerdefine void @f() { 44*9880d681SAndroid Build Coastguard Workerentry: 45*9880d681SAndroid Build Coastguard Worker call void (...) @g() 46*9880d681SAndroid Build Coastguard Worker ret void 47*9880d681SAndroid Build Coastguard Worker} 48