llvm-6502/test/CodeGen/X86/tailcall2.ll
Evan Cheng b17124553d Perform trivial tail call optimization for callees with "C" ABI. These are done
even when -tailcallopt is not specified and it does not require changing ABI.
First case is the most trivial one. Perform tail call optimization when both
the caller and callee do not return values and when the callee does not take
any input arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 06:25:16 +00:00

13 lines
275 B
LLVM

; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s
; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s
define void @bar(i32 %x) nounwind ssp {
entry:
; CHECK: bar:
; CHECK: jmp _foo
tail call void @foo() nounwind
ret void
}
declare void @foo()