1 ; This is a more aggressive form of accumulator recursion insertion, which
2 ; requires noticing that X doesn't change as we perform the tailcall. Thanks
3 ; go out to the anonymous users of the demo script for "suggesting"
4 ; optimizations that should be done. :)
6 ; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call
8 int %mul(int %x, int %y) {
10 %tmp.1 = seteq int %y, 0
11 br bool %tmp.1, label %return, label %endif
14 %tmp.8 = add int %y, -1
15 %tmp.5 = call int %mul( int %x, int %tmp.8 )
16 %tmp.9 = add int %tmp.5, %x