diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-06-25 02:44:56 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-06-25 02:44:56 +0000 |
commit | 644eb9befc4334f408cb6bed90ec5ed1a30f32a6 (patch) | |
tree | d23bca30e3b7be8cda0a321ff115eeca2351eef8 | |
parent | fdfd40b5f1c6559da2368ee1c90cbb52d44b9c08 (diff) | |
download | external_llvm-644eb9befc4334f408cb6bed90ec5ed1a30f32a6.tar.gz external_llvm-644eb9befc4334f408cb6bed90ec5ed1a30f32a6.tar.bz2 external_llvm-644eb9befc4334f408cb6bed90ec5ed1a30f32a6.zip |
Test case for r133858 (tail call optimize in the presence of byval).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133863 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/X86/sibcall-byval.ll | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sibcall-byval.ll b/test/CodeGen/X86/sibcall-byval.ll new file mode 100644 index 0000000000..c335f30a93 --- /dev/null +++ b/test/CodeGen/X86/sibcall-byval.ll @@ -0,0 +1,31 @@ +; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s -check-prefix=32 +; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s -check-prefix=64 + +%struct.p = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + +define i32 @f(%struct.p* byval align 4 %q) nounwind ssp { +entry: +; 32: _f: +; 32: jmp L_g$stub + +; 64: _f: +; 64: jmp _g + %call = tail call i32 @g(%struct.p* byval align 4 %q) nounwind + ret i32 %call +} + +declare i32 @g(%struct.p* byval align 4) + +define i32 @h(%struct.p* byval align 4 %q, i32 %r) nounwind ssp { +entry: +; 32: _h: +; 32: jmp L_i$stub + +; 64: _h: +; 64: jmp _i + + %call = tail call i32 @i(%struct.p* byval align 4 %q, i32 %r) nounwind + ret i32 %call +} + +declare i32 @i(%struct.p* byval align 4, i32) |