diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-01-25 01:28:33 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-25 01:28:33 +0000 |
commit | d6093ff4cb24561ee9b656a16ea3bb2552546b6f (patch) | |
tree | c61926114a94e8b80cac659783489a443ab87cf0 /llvm/test/CodeGen/ARM/call-tc.ll | |
parent | a7b224140784fb4694109e9a6d62097d246bdcd1 (diff) | |
download | bcm5719-llvm-d6093ff4cb24561ee9b656a16ea3bb2552546b6f.tar.gz bcm5719-llvm-d6093ff4cb24561ee9b656a16ea3bb2552546b6f.zip |
Don't merge restore with tail call instruction.
llvm-svn: 124167
Diffstat (limited to 'llvm/test/CodeGen/ARM/call-tc.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/call-tc.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/call-tc.ll b/llvm/test/CodeGen/ARM/call-tc.ll index 213db5e1d01..a77aba037be 100644 --- a/llvm/test/CodeGen/ARM/call-tc.ll +++ b/llvm/test/CodeGen/ARM/call-tc.ll @@ -1,5 +1,6 @@ ; RUN: llc < %s -mtriple=armv6-apple-darwin -mattr=+vfp2 -arm-tail-calls | FileCheck %s -check-prefix=CHECKV6 ; RUN: llc < %s -mtriple=armv6-linux-gnueabi -relocation-model=pic -mattr=+vfp2 -arm-tail-calls | FileCheck %s -check-prefix=CHECKELF +; RUN: llc < %s -mtriple=thumbv7-apple-darwin -arm-tail-calls | FileCheck %s -check-prefix=CHECKT2 @t = weak global i32 ()* null ; <i32 ()**> [#uses=1] @@ -63,3 +64,24 @@ entry: %0 = sdiv i32 %a, %b ret i32 %0 } + +; Make sure the tail call instruction isn't deleted +; rdar://8309338 +declare void @foo() nounwind + +define void @t7() nounwind { +entry: +; CHECKT2: t7: +; CHECKT2: blxeq _foo +; CHECKT2-NEXT: pop.w +; CHECKT2-NEXT: b.w _foo + br i1 undef, label %bb, label %bb1.lr.ph + +bb1.lr.ph: + tail call void @foo() nounwind + unreachable + +bb: + tail call void @foo() nounwind + ret void +} |