This testcase is missing an llvm-dis; I've fixed it.  Also, this  
patch breaks Transforms/TailCallElim/return-undef.ll,
which is testing that this transformation does happen.  Can't we  
detect whether the call is going to be lowered
to inline code and disable the transformation only in that case?

On Sep 10, 2007, at 1:58 PM, Chris Lattner wrote:
> Added: llvm/trunk/test/Transforms/TailCallElim/inf-recursion.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ 
> TailCallElim/inf-recursion.ll?rev=41804&view=auto
>
> ====================================================================== 
> ========
> --- llvm/trunk/test/Transforms/TailCallElim/inf-recursion.ll (added)
> +++ llvm/trunk/test/Transforms/TailCallElim/inf-recursion.ll Mon  
> Sep 10 15:58:55 2007
> @@ -0,0 +1,10 @@
> +; RUN: llvm-as < %s | opt -tailcallelim | grep call
> +; Don't turn this into an infinite loop, this is probably the  
> implementation
> +; of fabs and we expect the codegen to lower fabs.
> +
> +define double @fabs(double %f) {
> +entry:
> +        %tmp2 = call double @fabs( double %f )          ; <double>  
> [#uses=1]
> +        ret double %tmp2
> +}
> +

_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to