summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-04 19:50:33 +0000
committerDan Gohman <gohman@apple.com>2009-05-04 19:50:33 +0000
commitbb525f7e02fcf5b22ae6f4e80b215a764a1f576b (patch)
tree9686f4fdd8698195c4612570af9021616a366898 /llvm/lib/Target/X86/X86FastISel.cpp
parent60637985de74e89e4e47e1e71be3ffbf29592845 (diff)
downloadbcm5719-llvm-bb525f7e02fcf5b22ae6f4e80b215a764a1f576b.tar.gz
bcm5719-llvm-bb525f7e02fcf5b22ae6f4e80b215a764a1f576b.zip
X86FastISel doesn't support the -tailcallopt ABI.
llvm-svn: 70902
Diffstat (limited to 'llvm/lib/Target/X86/X86FastISel.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 2a44803f5a1..811887bdc61 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -30,6 +30,7 @@
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
+#include "llvm/Target/TargetOptions.h"
using namespace llvm;
namespace {
@@ -1115,6 +1116,11 @@ bool X86FastISel::X86SelectCall(Instruction *I) {
CC != CallingConv::X86_FastCall)
return false;
+ // On X86, -tailcallopt changes the fastcc ABI. FastISel doesn't
+ // handle this for now.
+ 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());
OpenPOWER on IntegriCloud