diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/ThinLTO/X86/Inputs/distributed_import.ll | 6 | ||||
-rw-r--r-- | llvm/test/ThinLTO/X86/distributed_import.ll | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/ThinLTO/X86/Inputs/distributed_import.ll b/llvm/test/ThinLTO/X86/Inputs/distributed_import.ll new file mode 100644 index 00000000000..759c3371434 --- /dev/null +++ b/llvm/test/ThinLTO/X86/Inputs/distributed_import.ll @@ -0,0 +1,6 @@ +@G = internal global i32 7 +define i32 @g() { +entry: + %0 = load i32, i32* @G + ret i32 %0 +} diff --git a/llvm/test/ThinLTO/X86/distributed_import.ll b/llvm/test/ThinLTO/X86/distributed_import.ll new file mode 100644 index 00000000000..b1ffd51359d --- /dev/null +++ b/llvm/test/ThinLTO/X86/distributed_import.ll @@ -0,0 +1,20 @@ +; RUN: opt -module-summary %s -o %t1.bc +; RUN: opt -module-summary %p/Inputs/distributed_import.ll -o %t2.bc + +; RUN: llvm-lto2 %t1.bc %t2.bc -o %t.o -save-temps \ +; RUN: -thinlto-distributed-indexes \ +; RUN: -r=%t1.bc,g, \ +; RUN: -r=%t1.bc,f,px \ +; RUN: -r=%t2.bc,g,px +; RUN: opt -function-import -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out +; RUN: opt -function-import -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out +; RUN: llvm-dis -o - %t2.out | FileCheck %s +; CHECK: @G.llvm.0 + +declare i32 @g(...) + +define void @f() { +entry: + call i32 (...) @g() + ret void +} |