1; PR672 2; RUN: %lli -jit-kind=mcjit %s 3; RUN: %lli %s 4; XFAIL: target={{i686.*windows.*}} 5 6define i32 @main() { 7 %res = tail call fastcc i32 @check_tail( i32 10, ptr @check_tail, i32 10 ) ; <i32> [#uses=1] 8 ret i32 %res 9} 10 11define fastcc i32 @check_tail(i32 %x, ptr %f, i32 %g) { 12 %tmp1 = icmp sgt i32 %x, 0 ; <i1> [#uses=1] 13 br i1 %tmp1, label %if-then, label %if-else 14if-then: ; preds = %0 15 %arg1 = add i32 %x, -1 ; <i32> [#uses=1] 16 %res = tail call fastcc i32 %f( i32 %arg1, ptr %f, i32 %g ) ; <i32> [#uses=1] 17 ret i32 %res 18if-else: ; preds = %0 19 ret i32 %x 20} 21 22