From e7b406d7ac150189522f0a139f1a2f76bde2cb26 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 30 Oct 2012 19:07:58 +0000 Subject: [PATCH] Do not do tail-call optimization if target is mips16. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167039 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/MipsISelLowering.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index b485b5ea16d..4479c48a915 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -2665,6 +2665,10 @@ IsEligibleForTailCallOptimization(const MipsCC &MipsCCInfo, bool IsVarArg, if (!EnableMipsTailCalls) return false; + // No tail call optimization for mips16. + if (Subtarget->inMips16Mode()) + return false; + if (MipsCCInfo.hasByValArg() || IsVarArg) return false;