Index: lib/Target/ARM/ARMBaseInstrInfo.h =================================================================== --- lib/Target/ARM/ARMBaseInstrInfo.h +++ lib/Target/ARM/ARMBaseInstrInfo.h @@ -104,6 +104,8 @@ getNoopForMachoTarget(NopInst); } + bool isTailCall(const MachineInstr &Inst) const override; + // Return the non-pre/post incrementing version of 'Opc'. Return 0 // if there is not such an opcode. virtual unsigned getUnindexedOpcode(unsigned Opc) const =0; Index: lib/Target/ARM/ARMBaseInstrInfo.cpp =================================================================== --- lib/Target/ARM/ARMBaseInstrInfo.cpp +++ lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -4623,6 +4623,19 @@ return Subtarget.getFeatureBits()[ARM::HasV6KOps]; } +bool ARMBaseInstrInfo::isTailCall(const MachineInstr &Inst) const +{ + switch (Inst.getOpcode()) { + case ARM::TAILJMPd: + case ARM::TAILJMPr: + case ARM::TCRETURNdi: + case ARM::TCRETURNri: + return true; + default: + return false; + } +} + bool ARMBaseInstrInfo::isSwiftFastImmShift(const MachineInstr *MI) const { if (MI->getNumOperands() < 4) return true;