From 27c4933e025b2938deb62bee4a9cf385e8e5ab9f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 29 May 2010 01:35:22 +0000 Subject: Fix PR7193: if sibling call address can take a register, make sure there are enough registers available by counting inreg arguments. llvm-svn: 105092 --- llvm/test/CodeGen/X86/sibcall-3.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 llvm/test/CodeGen/X86/sibcall-3.ll (limited to 'llvm/test/CodeGen/X86') 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 +} -- cgit v1.2.3