diff options
| author | Eric Christopher <echristo@gmail.com> | 2019-04-17 04:52:47 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2019-04-17 04:52:47 +0000 |
| commit | cee313d288a4faf0355d76fb6e0e927e211d08a5 (patch) | |
| tree | d386075318d761197779a96e5d8fc0dc7b06342b /llvm/test/Transforms/FunctionImport/funcimport_var.ll | |
| parent | c3d6a929fdd92fd06d4304675ade8d7210ee711a (diff) | |
| download | bcm5719-llvm-cee313d288a4faf0355d76fb6e0e927e211d08a5.tar.gz bcm5719-llvm-cee313d288a4faf0355d76fb6e0e927e211d08a5.zip | |
Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.
Will be re-reverting again.
llvm-svn: 358552
Diffstat (limited to 'llvm/test/Transforms/FunctionImport/funcimport_var.ll')
| -rw-r--r-- | llvm/test/Transforms/FunctionImport/funcimport_var.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionImport/funcimport_var.ll b/llvm/test/Transforms/FunctionImport/funcimport_var.ll new file mode 100644 index 00000000000..edd874e6297 --- /dev/null +++ b/llvm/test/Transforms/FunctionImport/funcimport_var.ll @@ -0,0 +1,27 @@ +; This test makes sure a static var is not selected as a callee target +; (which will crash compilation). +; RUN: opt -module-summary %s -o %t.bc +; RUN: opt -module-summary %p/Inputs/funcimport_var2.ll -o %t2.bc +; RUN: llvm-lto -thinlto -thinlto-action=thinlink -o %t3 %t.bc %t2.bc +; RUN: llvm-lto -thinlto -thinlto-action=import -thinlto-index=%t3 %t.bc %t2.bc +; RUN: llvm-lto -thinlto -thinlto-action=run %t.bc %t2.bc -exported-symbol=_Z4LinkPKcS0_ +; RUN: llvm-nm %t.bc.thinlto.o | FileCheck %s +; RUN: llvm-lto2 run %t.bc %t2.bc -o %t.out \ +; RUN: -r %t.bc,_Z4LinkPKcS0_,plx \ +; RUN: -r %t.bc,link,l \ +; RUN: -r %t2.bc,get_link,plx +; RUN: llvm-nm %t.out.1 | FileCheck %s +; CHECK: U link + +; REQUIRES: x86-registered-target + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +define i32 @_Z4LinkPKcS0_(i8*, i8*) local_unnamed_addr { + %3 = tail call i32 @link(i8* %0, i8* %1) #2 + ret i32 %3 +} + +; Function Attrs: nounwind +declare i32 @link(i8*, i8*) local_unnamed_addr |

