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.
4
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
8
9; CHECK: Export {
10; CHECK: Export {
11; CHECK:   RVA: 0x[[RVA:.*]]
12; CHECK: Export {
13; CHECK:   RVA: 0x[[RVA]]
14; CHECK-NOT: Export
15
16target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
17target triple = "x86_64-pc-windows-msvc19.12.25835"
18
19define dllexport i8* @icf_ptr() {
20entry:
21  ret i8* null
22}
23
24define dllexport i64 @icf_int() {
25entry:
26  ret i64 0
27}
28