xref: /llvm-project/llvm/test/ThinLTO/X86/funcattrs-prop-undefined.ll (revision 20faf789199d31a40c7f1a359361980c65067aab)
1; Callee1 isn't defined, propagation goes conservative
2; RUN: split-file %s %t
3; RUN: opt -thinlto-bc %t/main.ll -thin-link-bitcode-file=%t1.thinlink.bc -o %t1.bc
4; RUN: opt -thinlto-bc %t/callees.ll -thin-link-bitcode-file=%t2.thinlink.bc -o %t2.bc
5; RUN: llvm-lto2 run -disable-thinlto-funcattrs=0 %t1.bc %t2.bc -o %t.o -r %t1.bc,caller,px -r %t1.bc,callee,l -r %t1.bc,callee1,l -r %t2.bc,callee,px -save-temps
6; RUN: llvm-dis -o - %t.o.1.3.import.bc | FileCheck %s
7
8;--- main.ll
9target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10target triple = "x86_64-unknown-linux-gnu"
11
12declare void @callee()
13declare void @callee1()
14
15; CHECK-NOT: Function Attrs:
16; CHECK: define void @caller()
17define void @caller() {
18  call void @callee()
19  call void @callee1()
20  ret void
21}
22
23;--- callees.ll
24target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
25target triple = "x86_64-unknown-linux-gnu"
26
27attributes #0 = { nounwind norecurse }
28
29define void @callee() #0 {
30  ret void
31}
32