view test/CodeGen/X86/tailcallbyval.ll @ 33:e4204d083e25

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children afa8332a0e37
line wrap: on
line source

; RUN: llc < %s -mtriple=i686-unknown-linux -tailcallopt | FileCheck %s
%struct.s = type {i32, i32, i32, i32, i32, i32, i32, i32,
                  i32, i32, i32, i32, i32, i32, i32, i32,
                  i32, i32, i32, i32, i32, i32, i32, i32 }

define  fastcc i32 @tailcallee(%struct.s* byval %a) nounwind {
entry:
        %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0
        %tmp3 = load i32* %tmp2
        ret i32 %tmp3
; CHECK: tailcallee
; CHECK: movl 4(%esp), %eax
}

define  fastcc i32 @tailcaller(%struct.s* byval %a) nounwind {
entry:
        %tmp4 = tail call fastcc i32 @tailcallee(%struct.s* byval %a )
        ret i32 %tmp4
; CHECK: tailcaller
; CHECK: jmp tailcallee
}