aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/sibcall-3.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-05-29 01:35:22 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-05-29 01:35:22 +0000
commit9c044674e6349caff46fea79a103dfe210dfde56 (patch)
tree5f4165286b7b8af6240fd44bfbb47086b632ca1f /test/CodeGen/X86/sibcall-3.ll
parent5a0d4fcb8d0e624cf9452659f83e20f7e9e3444d (diff)
downloadexternal_llvm-9c044674e6349caff46fea79a103dfe210dfde56.zip
external_llvm-9c044674e6349caff46fea79a103dfe210dfde56.tar.gz
external_llvm-9c044674e6349caff46fea79a103dfe210dfde56.tar.bz2
Fix PR7193: if sibling call address can take a register, make sure there are enough registers available by counting inreg arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/sibcall-3.ll')
-rw-r--r--test/CodeGen/X86/sibcall-3.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sibcall-3.ll b/test/CodeGen/X86/sibcall-3.ll
new file mode 100644
index 0000000..f0d66cf
--- /dev/null
+++ b/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
+}