Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / thinlto-archives.ll
blob9194db8f65289d7299473ae0f99fb0b38a457897
1 ; REQUIRES: x86
2 ; RUN: rm -fr %T/thinlto-archives
3 ; RUN: mkdir %T/thinlto-archives %T/thinlto-archives/a %T/thinlto-archives/b
4 ; RUN: opt -thinlto-bc -o %T/thinlto-archives/main.obj %s
5 ; RUN: opt -thinlto-bc -o %T/thinlto-archives/a/bar.obj %S/Inputs/lto-dep.ll
6 ; RUN: opt -thinlto-bc -o %T/thinlto-archives/b/bar.obj %S/Inputs/bar.ll
7 ; RUN: llvm-ar crs %T/thinlto-archives/a.lib %T/thinlto-archives/a/bar.obj
8 ; RUN: llvm-ar crs %T/thinlto-archives/b.lib %T/thinlto-archives/b/bar.obj
9 ; RUN: lld-link -out:%T/thinlto-archives/main.exe -entry:main \
10 ; RUN:     -lldsavetemps -subsystem:console %T/thinlto-archives/main.obj \
11 ; RUN:     %T/thinlto-archives/a.lib %T/thinlto-archives/b.lib
12 ; RUN: FileCheck %s < %T/thinlto-archives/main.exe.resolution.txt
14 ; CHECK: {{/thinlto-archives/main.obj$}}
15 ; CHECK: {{^-r=.*/thinlto-archives/main.obj,main,px$}}
16 ; CHECK: {{/thinlto-archives/a.libbar.obj[0-9]+$}}
17 ; CHECK-NEXT: {{^-r=.*/thinlto-archives/a.libbar.obj[0-9]+,foo,p$}}
18 ; CHECK-NEXT: {{/thinlto-archives/b.libbar.obj[0-9]+$}}
19 ; CHECK-NEXT: {{^-r=.*/thinlto-archives/b.libbar.obj[0-9]+,bar,p$}}
21 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22 target triple = "x86_64-pc-windows-msvc"
24 declare void @bar()
25 declare void @foo()
27 define i32 @main() {
28   call void @foo()
29   call void @bar()
30   ret i32 0