diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-05-29 01:35:22 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-05-29 01:35:22 +0000 |
commit | 27c4933e025b2938deb62bee4a9cf385e8e5ab9f (patch) | |
tree | c0cd0185093f8178c2940053b6c9b88562b42ad8 /llvm/test/CodeGen/X86 | |
parent | 117ef277cb6da9d9450144083b3ea0bc223ed772 (diff) | |
download | bcm5719-llvm-27c4933e025b2938deb62bee4a9cf385e8e5ab9f.tar.gz bcm5719-llvm-27c4933e025b2938deb62bee4a9cf385e8e5ab9f.zip |
Fix PR7193: if sibling call address can take a register, make sure there are enough registers available by counting inreg arguments.
llvm-svn: 105092
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r-- | llvm/test/CodeGen/X86/sibcall-3.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/sibcall-3.ll b/llvm/test/CodeGen/X86/sibcall-3.ll new file mode 100644 index 00000000000..f0d66cf7b69 --- /dev/null +++ b/llvm/test/CodeGen/X86/sibcall-3.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -mtriple=i386-unknown-unknown | FileCheck %s +; PR7193 + +define void @t1(i8* inreg %dst, i8* inreg %src, i8* inreg %len) nounwind { +; CHECK: t1: +; CHECK: call 0 + tail call void null(i8* inreg %dst, i8* inreg %src, i8* inreg %len) nounwind + ret void +} + +define void @t2(i8* inreg %dst, i8* inreg %src, i8* inreg %len) nounwind { +; CHECK: t2: +; CHECK: jmpl + tail call void null(i8* inreg %dst, i8* inreg %src) nounwind + ret void +} |