1 ; This test checks that ThinLTO doesn't try to import noinline function
2 ; which, when takes place, causes promotion of its callee.
3 ; RUN: opt -module-summary %s -o %t1.bc
4 ; RUN: opt -module-summary %p/Inputs/noinline.ll -o %t2.bc
5 ; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t3.o \
7 ; RUN: -r=%t1.bc,main,px \
8 ; RUN: -r=%t1.bc,foo, \
11 ; RUN: llvm-dis %t3.o.1.3.import.bc -o - | FileCheck %s
13 ; CHECK-NOT: define available_externally i32 @foo
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 ; Function Attrs: nounwind ssp uwtable
19 define i32 @main(i32, ptr nocapture readnone) local_unnamed_addr #0 {
20 %3 = tail call i32 @foo(i32 %0) #0
24 declare i32 @foo(i32) local_unnamed_addr
26 attributes #0 = { nounwind }