blob: 92d87ddcbf1e3d3f1ac8aab4343f625ec9e6d5d7 [file] [log] [blame]
Chris Lattneraad707b2005-12-03 17:20:57 +00001; RUN: llvm-as < %s | lli
Chris Lattner8e222002005-12-03 07:14:47 +00002
3; PR672
4
5int %main(){
6 %f = cast int (int, int*, int)* %check_tail to int*
7 %res = tail call fastcc int %check_tail( int 10, int* %f,int 10)
8 ret int %res
9}
10fastcc int %check_tail(int %x, int* %f, int %g) {
11 %tmp1 = setgt int %x, 0
12 br bool %tmp1, label %if-then, label %if-else
13
14if-then:
15 %fun_ptr = cast int* %f to int(int, int*, int)*
16 %arg1 = add int %x, -1
17 %res = tail call fastcc int %fun_ptr( int %arg1, int * %f, int %g)
18 ret int %res
19
20if-else:
21 ret int %x
22}