From df78fcd2d6ba4fd499ead3bdea2fde83dbcecab9 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Sat, 25 Jun 2011 02:04:56 +0000 Subject: [PATCH] Enable tail call optimization in the presence of a byval (x86-32 and x86-64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133858 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 6c606be5912..bab15e62a27 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -2505,6 +2505,10 @@ bool MatchingStackOffset(SDValue Arg, unsigned Offset, ISD::ArgFlagsTy Flags, if (!FINode) return false; FI = FINode->getIndex(); + } else if (Arg.getOpcode() == ISD::FrameIndex && Flags.isByVal()) { + FrameIndexSDNode *FINode = dyn_cast(Arg); + FI = FINode->getIndex(); + Bytes = Flags.getByValSize(); } else return false;