diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
| commit | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch) | |
| tree | 98b8f811c7aff2547cab8642daf372d6c59502fb /test/CodeGen/PowerPC/longcall.ll | |
| parent | 6421cca32f69ac849537a3cff78c352195e99f1b (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/PowerPC/longcall.ll')
| -rw-r--r-- | test/CodeGen/PowerPC/longcall.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/longcall.ll b/test/CodeGen/PowerPC/longcall.ll new file mode 100644 index 000000000000..9645ca8d31f3 --- /dev/null +++ b/test/CodeGen/PowerPC/longcall.ll @@ -0,0 +1,26 @@ +; RUN: llc < %s | FileCheck %s +target datalayout = "E-m:e-i64:64-n32:64" +target triple = "powerpc64-unknown-linux-gnu" + +; Function Attrs: nounwind +define void @bar() local_unnamed_addr #0 { +entry: + tail call void @foo() #1 + ret void + +; CHECK-LABEL: @bar +; CHECK: ld [[FD:[0-9]+]], .LC0@toc@l({{[0-9]+}}) +; CHECK: ld [[ADDR:[0-9]+]], 0([[FD]]) +; CHECK: mtctr [[ADDR]] +; CHECK: bctrl +; CHECK-NOT: bl foo +; CHECK: blr +} + +; CHECK: .tc foo + +declare void @foo() local_unnamed_addr + +attributes #0 = { nounwind "target-cpu"="ppc64" "target-features"="+longcall" } +attributes #1 = { nounwind } + |
