parent
107a1fbf61
commit
aeba2250a5
|
@ -52,7 +52,6 @@ using namespace llvm;
|
||||||
|
|
||||||
STATISTIC(NumTailCalls, "Number of tail calls");
|
STATISTIC(NumTailCalls, "Number of tail calls");
|
||||||
|
|
||||||
static cl::opt<unsigned> TailCallLimit("tailcall-limit", cl::init(0));
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
DisableMMX("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX"));
|
DisableMMX("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX"));
|
||||||
|
|
||||||
|
@ -2271,8 +2270,6 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
|
||||||
|
|
||||||
// Look for obvious safe cases to perform tail call optimization that does not
|
// Look for obvious safe cases to perform tail call optimization that does not
|
||||||
// requite ABI changes. This is what gcc calls sibcall.
|
// requite ABI changes. This is what gcc calls sibcall.
|
||||||
if (NumTailCalls >= TailCallLimit)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Do not tail call optimize vararg calls for now.
|
// Do not tail call optimize vararg calls for now.
|
||||||
if (isVarArg)
|
if (isVarArg)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s -check-prefix=32
|
; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s -check-prefix=32
|
||||||
; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s -check-prefix=64
|
; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s -check-prefix=64
|
||||||
; XFAIL: *
|
|
||||||
|
|
||||||
define void @t1(i32 %x) nounwind ssp {
|
define void @t1(i32 %x) nounwind ssp {
|
||||||
entry:
|
entry:
|
||||||
|
@ -107,10 +106,10 @@ declare i32 @bar2(i32, i32, i32)
|
||||||
define signext i16 @t8() nounwind ssp {
|
define signext i16 @t8() nounwind ssp {
|
||||||
entry:
|
entry:
|
||||||
; 32: t8:
|
; 32: t8:
|
||||||
; 32: jmp {{_?}}bar3
|
; 32: call {{_?}}bar3
|
||||||
|
|
||||||
; 64: t8:
|
; 64: t8:
|
||||||
; 64: jmp {{_?}}bar3
|
; 64: callq {{_?}}bar3
|
||||||
%0 = tail call signext i16 @bar3() nounwind ; <i16> [#uses=1]
|
%0 = tail call signext i16 @bar3() nounwind ; <i16> [#uses=1]
|
||||||
ret i16 %0
|
ret i16 %0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue