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