27 lines · plain
1; REQUIRES: x862; 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.bc6; RUN: lld-link -opt:icf -dll -noentry %t.bc -out:%t.dll7; RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s8 9; CHECK: Export {10; CHECK: RVA: 0x[[RVA:.*]]11; CHECK: Export {12; CHECK: RVA: 0x[[RVA]]13; CHECK-NOT: Export14 15target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"16target triple = "x86_64-pc-windows-msvc19.12.25835"17 18define dllexport ptr @icf_ptr() {19entry:20 ret ptr null21}22 23define dllexport i64 @icf_int() {24entry:25 ret i64 026}27