[Dexter][NFC] Add Missing Commands to Commands.md Contents
[llvm-project.git] / lld / test / COFF / lto-icf.ll
blob0b0c26eb2ad89c7d0d4ccffd2ab7d1512712e837
1 ; REQUIRES: x86
2 ; Test that ICF works after LTO, i.e. both functions have the same address.
3 ; Previously, when we didn't enable function sections, ICF didn't work.
5 ; RUN: llvm-as %s -o %t.bc
6 ; RUN: lld-link -opt:icf -dll -noentry %t.bc -out:%t.dll
7 ; RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s
9 ; CHECK: Export {
10 ; CHECK: Export {
11 ; CHECK:   RVA: 0x[[RVA:.*]]
12 ; CHECK: Export {
13 ; CHECK:   RVA: 0x[[RVA]]
14 ; CHECK-NOT: Export
16 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
17 target triple = "x86_64-pc-windows-msvc19.12.25835"
19 define dllexport i8* @icf_ptr() {
20 entry:
21   ret i8* null
24 define dllexport i64 @icf_int() {
25 entry:
26   ret i64 0