xref: /llvm-project/lld/test/COFF/lto-emit-asm.ll (revision d12b99a4313816cf99e97cb5f579e2d51ba72b0b)
1; REQUIRES: x86
2; RUN: llvm-as %s -o %t.obj
3
4; RUN: lld-link /lldemit:asm /dll /noentry /include:f1 /include:f2 %t.obj /opt:lldltopartitions=1 /out:%t.1p /lldsavetemps
5; RUN: cat %t.1p.lto.s | FileCheck %s
6; RUN: llvm-dis %t.1p.0.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
7
8; RUN: lld-link /lldemit:asm /dll /noentry /include:f1 /include:f2 %t.obj /opt:lldltopartitions=2 /out:%t.2p
9; RUN: cat %t.2p.lto.s %t.2p.lto.1.s | FileCheck %s
10
11target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
12target triple = "x86_64-pc-windows-msvc"
13
14;; Note: we also check for the presence of comments; /lldemit:asm output should be verbose.
15
16; CHECK-DAG: # -- Begin function f1
17; CHECK-DAG: f1:
18; OPT: define void @f1()
19define void @f1() {
20  ret void
21}
22
23; CHECK-DAG: # -- Begin function f2
24; CHECK-DAG: f2:
25; OPT: define void @f2()
26define void @f2() {
27  ret void
28}
29