1 ; RUN: opt -module-summary %s -o %t1.bc
2 ; RUN: opt -module-summary %p/Inputs/globals-import-cf-baz.ll -o %t2.bc
3 ; RUN: llvm-lto -thinlto-action=thinlink %t1.bc %t2.bc -o %t3.index.bc
5 ; RUN: llvm-lto -thinlto-action=import -exported-symbol=main %t1.bc -thinlto-index=%t3.index.bc
6 ; RUN: llvm-dis %t1.bc.thinlto.imported.bc -o - | FileCheck --check-prefix=IMPORT %s
7 ; RUN: llvm-lto -thinlto-action=optimize %t1.bc.thinlto.imported.bc -o %t1.bc.thinlto.opt.bc
8 ; RUN: llvm-dis %t1.bc.thinlto.opt.bc -o - | FileCheck --check-prefix=OPTIMIZE %s
10 ; IMPORT: @baz = internal local_unnamed_addr constant i32 10
12 ; OPTIMIZE: define i32 @main()
13 ; OPTIMIZE-NEXT: ret i32 10
15 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
16 target triple = "x86_64-pc-linux-gnu"
18 @baz = external local_unnamed_addr constant i32, align 4
20 define i32 @main() local_unnamed_addr {
21 %1 = load i32, i32* @baz, align 4