llvm.org GIT mirror llvm / 60ef91a
We need support for tail calls, this is moved to PR1392 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36798 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
2 changed file(s) with 0 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
+0
-25
test/CodeGen/X86/2005-12-03-IndirectTailCall.ll less more
None ; XFAIL: *
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {jmp \\*ecx}
2 declare int %putchar(int)
3
4 int %main(){
5 %f = cast int (int, int*, int)* %check_tail to int*
6 %res = tail call fastcc int %check_tail( int 10, int* %f,int 10)
7 ret int %res
8 }
9
10 fastcc 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
14 if-then:
15 %fun_ptr = cast int* %f to int(int, int*, int)*
16 %arg1 = add int %x, -1
17 call int %putchar(int 90)
18 %res = tail call fastcc int %fun_ptr( int %arg1, int * %f, int %g)
19 ret int %res
20
21 if-else:
22 ret int %x
23 }
24
+0
-8
test/CodeGen/X86/fast-cc-tail-call.ll less more
None ; XFAIL: *
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep call
2
3 fastcc int %bar(int %X, int(double, int) *%FP) {
4 %Y = tail call fastcc int %FP(double 0.0, int %X)
5 ret int %Y
6 }
7