28 lines · plain
1; REQUIRES: x862; RUN: mkdir -p %t.dir3; RUN: llc -mtriple=i686-pc-windows-msvc -filetype=obj -o %t.dir/lto-lazy-reference-quadruple.obj %S/Inputs/lto-lazy-reference-quadruple.ll4; RUN: llvm-as -o %t.dir/lto-lazy-reference-dummy.bc %S/Inputs/lto-lazy-reference-dummy.ll5; RUN: rm -f %t.lib6; RUN: llvm-ar cru %t.lib %t.dir/lto-lazy-reference-quadruple.obj %t.dir/lto-lazy-reference-dummy.bc7; RUN: llvm-as -o %t.obj %s8; RUN: lld-link /out:%t.exe /entry:main /subsystem:console %t.obj %t.lib9 10target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"11target triple = "i686-pc-windows-msvc18.0.0"12 13; Define fltused, since we don't link against the MS C runtime but are14; using floats.15@_fltused = dllexport global i32 0, align 416 17define double @main(double %x) {18entry:19 ; When compiled, this defines the __real@40800000 symbol, which already has a20 ; lazy definition in the lib file from lto-lazy-reference-quadruple.obj. This21 ; test makes sure we *don't* try to take the definition from the lazy22 ; reference, because that can bring in new references to bitcode files after23 ; LTO, such as lto-lazy-reference-dummy.bc in this case.24 %mul = fmul double %x, 4.025 26 ret double %mul27}28