annotate lld/test/COFF/thinlto-index-only.ll @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; REQUIRES: x86
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; Basic ThinLTO tests.
anatofuz
parents:
diff changeset
4 ; RUN: opt -thinlto-bc %s -o %t1.obj
anatofuz
parents:
diff changeset
5 ; RUN: opt -thinlto-bc %p/Inputs/thinlto.ll -o %t2.obj
anatofuz
parents:
diff changeset
6 ; RUN: opt -thinlto-bc %p/Inputs/thinlto-empty.ll -o %t3.obj
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 ; Ensure lld generates an index and not a binary if requested.
anatofuz
parents:
diff changeset
9 ; RUN: rm -f %t4.exe
anatofuz
parents:
diff changeset
10 ; RUN: lld-link -thinlto-index-only -entry:main %t1.obj %t2.obj -out:%t4.exe
anatofuz
parents:
diff changeset
11 ; RUN: llvm-bcanalyzer -dump %t1.obj.thinlto.bc | FileCheck %s --check-prefix=BACKEND1
anatofuz
parents:
diff changeset
12 ; RUN: llvm-bcanalyzer -dump %t2.obj.thinlto.bc | FileCheck %s --check-prefix=BACKEND2
anatofuz
parents:
diff changeset
13 ; RUN: not test -e %t4.exe
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 ; The backend index for this module contains summaries from itself and
anatofuz
parents:
diff changeset
16 ; Inputs/thinlto.ll, as it imports from the latter.
anatofuz
parents:
diff changeset
17 ; BACKEND1: <MODULE_STRTAB_BLOCK
anatofuz
parents:
diff changeset
18 ; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp{{.*}}.obj'
anatofuz
parents:
diff changeset
19 ; BACKEND1: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp{{.*}}.obj'
anatofuz
parents:
diff changeset
20 ; BACKEND1-NOT: <ENTRY
anatofuz
parents:
diff changeset
21 ; BACKEND1: </MODULE_STRTAB_BLOCK
anatofuz
parents:
diff changeset
22 ; BACKEND1: <GLOBALVAL_SUMMARY_BLOCK
anatofuz
parents:
diff changeset
23 ; BACKEND1: <VERSION
anatofuz
parents:
diff changeset
24 ; BACKEND1: <FLAGS
anatofuz
parents:
diff changeset
25 ; BACKEND1: <VALUE_GUID op0={{1|2}} op1={{-5300342847281564238|-2624081020897602054}}
anatofuz
parents:
diff changeset
26 ; BACKEND1: <VALUE_GUID op0={{1|2}} op1={{-5300342847281564238|-2624081020897602054}}
anatofuz
parents:
diff changeset
27 ; BACKEND1: <COMBINED
anatofuz
parents:
diff changeset
28 ; BACKEND1: <COMBINED
anatofuz
parents:
diff changeset
29 ; BACKEND1: </GLOBALVAL_SUMMARY_BLOCK
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 ; The backend index for Input/thinlto.ll contains summaries from itself only,
anatofuz
parents:
diff changeset
32 ; as it does not import anything.
anatofuz
parents:
diff changeset
33 ; BACKEND2: <MODULE_STRTAB_BLOCK
anatofuz
parents:
diff changeset
34 ; BACKEND2-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp2.obj'
anatofuz
parents:
diff changeset
35 ; BACKEND2-NOT: <ENTRY
anatofuz
parents:
diff changeset
36 ; BACKEND2: </MODULE_STRTAB_BLOCK
anatofuz
parents:
diff changeset
37 ; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK
anatofuz
parents:
diff changeset
38 ; BACKEND2-NEXT: <VERSION
anatofuz
parents:
diff changeset
39 ; BACKEND2-NEXT: <FLAGS
anatofuz
parents:
diff changeset
40 ; BACKEND2-NEXT: <VALUE_GUID op0=1 op1=-5300342847281564238
anatofuz
parents:
diff changeset
41 ; BACKEND2-NEXT: <COMBINED
anatofuz
parents:
diff changeset
42 ; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK
anatofuz
parents:
diff changeset
43
anatofuz
parents:
diff changeset
44 ; Thin archive tests. Check that the module paths point to the original files.
anatofuz
parents:
diff changeset
45 ; RUN: rm -rf %t
anatofuz
parents:
diff changeset
46 ; RUN: mkdir %t
anatofuz
parents:
diff changeset
47 ; RUN: opt -thinlto-bc -o %t/foo.obj < %s
anatofuz
parents:
diff changeset
48 ; RUN: opt -thinlto-bc -o %t/bar.obj < %p/Inputs/thinlto.ll
anatofuz
parents:
diff changeset
49 ; RUN: llvm-ar rcsT %t5.lib %t/bar.obj %t3.obj
anatofuz
parents:
diff changeset
50 ; RUN: lld-link -thinlto-index-only -entry:main %t/foo.obj %t5.lib
anatofuz
parents:
diff changeset
51 ; RUN: llvm-dis -o - %t/foo.obj.thinlto.bc | FileCheck %s --check-prefix=THINARCHIVE
anatofuz
parents:
diff changeset
52 ; THINARCHIVE: ^0 = module: (path: "{{.*}}foo.obj",
anatofuz
parents:
diff changeset
53 ; THINARCHIVE: ^1 = module: (path: "{{.*}}bar.obj",
anatofuz
parents:
diff changeset
54
anatofuz
parents:
diff changeset
55 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
anatofuz
parents:
diff changeset
56 target triple = "x86_64-pc-windows-msvc19.0.24215"
anatofuz
parents:
diff changeset
57
anatofuz
parents:
diff changeset
58 declare void @g(...)
anatofuz
parents:
diff changeset
59
anatofuz
parents:
diff changeset
60 define void @main() {
anatofuz
parents:
diff changeset
61 call void (...) @g()
anatofuz
parents:
diff changeset
62 ret void
anatofuz
parents:
diff changeset
63 }