diff options
Diffstat (limited to 'test/ThinLTO/X86/distributed_import.ll')
-rw-r--r-- | test/ThinLTO/X86/distributed_import.ll | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/test/ThinLTO/X86/distributed_import.ll b/test/ThinLTO/X86/distributed_import.ll index e7e4904d52b..365fbd9b0f7 100644 --- a/test/ThinLTO/X86/distributed_import.ll +++ b/test/ThinLTO/X86/distributed_import.ll @@ -10,11 +10,15 @@ ; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \ ; RUN: -thinlto-distributed-indexes \ ; RUN: -r=%t1.bc,g, \ +; RUN: -r=%t1.bc,analias, \ ; 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 +; RUN: -r=%t2.bc,g,px \ +; RUN: -r=%t2.bc,analias,px \ +; RUN: -r=%t2.bc,aliasee,px +; RUN: opt -function-import -import-all-index -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out +; RUN: opt -function-import -import-all-index -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out +; RUN: llvm-dis -o - %t1.out | FileCheck %s --check-prefix=IMPORT +; RUN: llvm-dis -o - %t2.out | FileCheck %s --check-prefix=EXPORT ; Save the generated index files. ; RUN: cp %t1.bc.thinlto.bc %t1.bc.thinlto.bc.orig @@ -34,26 +38,35 @@ ; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \ ; RUN: -thinlto-distributed-indexes \ ; RUN: -r=%t1.bc,g, \ +; RUN: -r=%t1.bc,analias, \ ; RUN: -r=%t1.bc,f,px \ -; RUN: -r=%t2.bc,g,px +; RUN: -r=%t2.bc,g,px \ +; RUN: -r=%t2.bc,analias,px \ +; RUN: -r=%t2.bc,aliasee,px ; RUN: diff %t1.bc.thinlto.bc.orig %t1.bc.thinlto.bc ; RUN: diff %t2.bc.thinlto.bc.orig %t2.bc.thinlto.bc ; Make sure importing occurs as expected ; RUN: cp %t1.bc.sv %t1.bc ; RUN: cp %t2.bc.sv %t2.bc -; RUN: opt -function-import -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out -; RUN: llvm-dis -o - %t2.out | FileCheck %s +; RUN: opt -function-import -import-all-index -summary-file %t1.bc.thinlto.bc %t1.bc -o %t1.out +; RUN: opt -function-import -import-all-index -summary-file %t2.bc.thinlto.bc %t2.bc -o %t2.out +; RUN: llvm-dis -o - %t1.out | FileCheck %s --check-prefix=IMPORT +; RUN: llvm-dis -o - %t2.out | FileCheck %s --check-prefix=EXPORT -; CHECK: @G.llvm. +; IMPORT: define available_externally i32 @g() !thinlto_src_module +; IMPORT: define available_externally void @analias() !thinlto_src_module +; EXPORT: @G.llvm. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" declare i32 @g(...) +declare void @analias(...) define void @f() { entry: call i32 (...) @g() + call void (...) @analias() ret void } |