diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 6 | 
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()); | 

