Teresa Johnson | 84174c3 | 2016-05-10 13:48:23 +0000 | [diff] [blame] | 1 | ; RUN: opt -module-summary %s -o %t1.bc |
| 2 | ; RUN: opt -module-summary %p/Inputs/distributed_indexes.ll -o %t2.bc |
| 3 | ; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc %t2.bc |
| 4 | ; RUN: llvm-lto -thinlto-action=distributedindexes -thinlto-index %t.index.bc %t1.bc %t2.bc |
| 5 | ; RUN: llvm-bcanalyzer -dump %t1.bc.thinlto.bc | FileCheck %s --check-prefix=BACKEND1 |
| 6 | ; RUN: llvm-bcanalyzer -dump %t2.bc.thinlto.bc | FileCheck %s --check-prefix=BACKEND2 |
| 7 | |
| 8 | ; The backend index for this module contains summaries from itself and |
| 9 | ; Inputs/distributed_indexes.ll, as it imports from the latter. |
| 10 | ; BACKEND1: <MODULE_STRTAB_BLOCK |
| 11 | ; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}distributed_indexes.ll.tmp{{.*}}.bc' |
| 12 | ; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}distributed_indexes.ll.tmp{{.*}}.bc' |
| 13 | ; BACKEND1-NEXT: </MODULE_STRTAB_BLOCK |
| 14 | ; BACKEND1-NEXT: <GLOBALVAL_SUMMARY_BLOCK |
| 15 | ; BACKEND1-NEXT: <VERSION |
Peter Collingbourne | a0f371a | 2017-04-17 17:51:36 +0000 | [diff] [blame^] | 16 | ; BACKEND1-NEXT: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}} |
| 17 | ; BACKEND1-NEXT: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}} |
Teresa Johnson | 84174c3 | 2016-05-10 13:48:23 +0000 | [diff] [blame] | 18 | ; BACKEND1-NEXT: <COMBINED |
| 19 | ; BACKEND1-NEXT: <COMBINED |
| 20 | ; BACKEND1-NEXT: </GLOBALVAL_SUMMARY_BLOCK |
Teresa Johnson | 84174c3 | 2016-05-10 13:48:23 +0000 | [diff] [blame] | 21 | |
| 22 | ; The backend index for Input/distributed_indexes.ll contains summaries from |
| 23 | ; itself only, as it does not import anything. |
| 24 | ; BACKEND2: <MODULE_STRTAB_BLOCK |
| 25 | ; BACKEND2-NEXT: <ENTRY {{.*}} record string = '{{.*}}distributed_indexes.ll.tmp2.bc' |
| 26 | ; BACKEND2-NEXT: </MODULE_STRTAB_BLOCK |
| 27 | ; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK |
| 28 | ; BACKEND2-NEXT: <VERSION |
Peter Collingbourne | a0f371a | 2017-04-17 17:51:36 +0000 | [diff] [blame^] | 29 | ; BACKEND2-NEXT: <VALUE_GUID op0=1 op1=-5300342847281564238 |
Teresa Johnson | 84174c3 | 2016-05-10 13:48:23 +0000 | [diff] [blame] | 30 | ; BACKEND2-NEXT: <COMBINED |
| 31 | ; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK |
Teresa Johnson | 84174c3 | 2016-05-10 13:48:23 +0000 | [diff] [blame] | 32 | |
| 33 | declare void @g(...) |
| 34 | |
| 35 | define void @f() { |
| 36 | entry: |
| 37 | call void (...) @g() |
| 38 | ret void |
| 39 | } |