From: Evan Cheng Date: Sun, 31 Jan 2010 07:27:31 +0000 (+0000) Subject: Fix a missing check from my last commit. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e626b0f6b187731ea3b3df2171f2d4e093f69f19;p=oota-llvm.git Fix a missing check from my last commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94949 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index e27d93cf7c8..e272d9b92af 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -2270,7 +2270,8 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee, return false; // If it's an indirect call, conversatively return false if the caller's // address is taken. - if (!isa(Callee) && CallerF->hasAddressTaken()) + if (!CalleeF && + !isa(Callee) && CallerF->hasAddressTaken()) return false; // Look for obvious safe cases to perform tail call optimization.