aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-10-25 22:17:05 +0000
committerDale Johannesen <dalej@apple.com>2010-10-25 22:17:05 +0000
commitd155d7e428e0e14b520dddbf00b6745d7eb2d7b8 (patch)
tree6f16ff18803a4f05279dcf0ac14a217f03cdf838 /lib/Target/X86/X86ISelLowering.cpp
parent87c5c2f069fe18df5a372e6eb7bbca3be4d09fac (diff)
downloadexternal_llvm-d155d7e428e0e14b520dddbf00b6745d7eb2d7b8.zip
external_llvm-d155d7e428e0e14b520dddbf00b6745d7eb2d7b8.tar.gz
external_llvm-d155d7e428e0e14b520dddbf00b6745d7eb2d7b8.tar.bz2
An stdcall function calling a non-stdcall function
cannot use tailcall. PR 8461. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index ca812c8..f698cec 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -2532,6 +2532,11 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
}
}
+ // An stdcall caller is expected to clean up its arguments; the callee
+ // isn't going to do that. PR 8461.
+ if (!CCMatch && CallerCC==CallingConv::X86_StdCall)
+ return false;
+
return true;
}