aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-01-27 00:00:57 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-01-27 00:00:57 +0000
commit381993f1f2f947fcdaec814181a735091b22fcba (patch)
tree6d06cea491e3e772ec8a8958ac9013d8ee90aa46 /lib/Target
parent9bc20ab519d47146a9716d7cff2a892da78774a6 (diff)
downloadexternal_llvm-381993f1f2f947fcdaec814181a735091b22fcba.tar.gz
external_llvm-381993f1f2f947fcdaec814181a735091b22fcba.tar.bz2
external_llvm-381993f1f2f947fcdaec814181a735091b22fcba.zip
Restore to pre-94570 state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/X86FastISel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index e3650af33b..94dec7ce35 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -31,6 +31,7 @@
#include "llvm/Support/CallSite.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
+#include "llvm/Target/TargetOptions.h"
using namespace llvm;
namespace {
@@ -1243,6 +1244,11 @@ bool X86FastISel::X86SelectCall(Instruction *I) {
CC != CallingConv::X86_FastCall)
return false;
+ // fastcc with -tailcallopt is intended to provide a guaranteed
+ // tail call optimization. Fastisel doesn't know how to do that.
+ if (CC == CallingConv::Fast && PerformTailCallOpt)
+ return false;
+
// Let SDISel handle vararg functions.
const PointerType *PT = cast<PointerType>(CS.getCalledValue()->getType());
const FunctionType *FTy = cast<FunctionType>(PT->getElementType());