diff options
| author | Roman Divacky <rdivacky@freebsd.org> | 2012-09-18 19:51:44 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@freebsd.org> | 2012-09-18 19:51:44 +0000 |
| commit | 947148aa45c2ca7c4c73c249148ea81e4c73ec29 (patch) | |
| tree | e45fae8d45ef4badaed45482ef598d818adce160 /llvm/test/CodeGen/PowerPC | |
| parent | 4d0c299f399b934476a744e7e09418a4d5e5463d (diff) | |
| download | bcm5719-llvm-947148aa45c2ca7c4c73c249148ea81e4c73ec29.tar.gz bcm5719-llvm-947148aa45c2ca7c4c73c249148ea81e4c73ec29.zip | |
Add test for r164155 and remove two tests superseded by ppc64-calls.ll.
llvm-svn: 164162
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/bl8_elf_nop.ll | 16 | ||||
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/ppc64-calls.ll | 14 | ||||
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/ppc64-ind-call.ll | 16 |
3 files changed, 14 insertions, 32 deletions
diff --git a/llvm/test/CodeGen/PowerPC/bl8_elf_nop.ll b/llvm/test/CodeGen/PowerPC/bl8_elf_nop.ll deleted file mode 100644 index 386c59e3223..00000000000 --- a/llvm/test/CodeGen/PowerPC/bl8_elf_nop.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64" -target triple = "powerpc64-unknown-linux-gnu" - -declare i32 @clock() nounwind - -define i32 @func() { -entry: - %call = call i32 @clock() nounwind - %call2 = add i32 %call, 7 - ret i32 %call2 -} - -; CHECK: bl clock -; CHECK-NEXT: nop - diff --git a/llvm/test/CodeGen/PowerPC/ppc64-calls.ll b/llvm/test/CodeGen/PowerPC/ppc64-calls.ll index 1193fd2d8db..c382edbbce4 100644 --- a/llvm/test/CodeGen/PowerPC/ppc64-calls.ll +++ b/llvm/test/CodeGen/PowerPC/ppc64-calls.ll @@ -6,6 +6,10 @@ define void @foo() nounwind readnone noinline { ret void } +define weak void @foo_weak() nounwind { + ret void +} + ; Calls to local function does not require the TOC restore 'nop' define void @test_direct() nounwind readnone { ; CHECK: test_direct: @@ -15,6 +19,16 @@ define void @test_direct() nounwind readnone { ret void } +; Calls to weak function requires a TOC restore 'nop' because they +; may be overridden in a different module. +define void @test_weak() nounwind readnone { +; CHECK: test_weak: + tail call void @foo_weak() nounwind +; CHECK: bl foo +; CHECK-NEXT: nop + ret void +} + ; Indirect calls requires a full stub creation define void @test_indirect(void ()* nocapture %fp) nounwind { ; CHECK: test_indirect: diff --git a/llvm/test/CodeGen/PowerPC/ppc64-ind-call.ll b/llvm/test/CodeGen/PowerPC/ppc64-ind-call.ll deleted file mode 100644 index d5c4d468c65..00000000000 --- a/llvm/test/CodeGen/PowerPC/ppc64-ind-call.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: llc < %s -march=ppc64 | FileCheck %s -target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64" -target triple = "powerpc64-unknown-linux-gnu" - -define void @test1() { -entry: - %call.i75 = call zeroext i8 undef(i8* undef, i8 zeroext 10) - unreachable -} - -; CHECK: @test1 -; CHECK: ld 11, 0(3) -; CHECK: ld 2, 8(3) -; CHECK: bctrl -; CHECK: ld 2, 40(1) - |

