On Jun 27, 2007, at 2:50 AM, Zhou Sheng wrote:
> Fix a bug.

Testcase plz!  What does this do, it seems wrong.

-Chris

> ---
> Diffs of the changes:  (+4 -1)
>
>  IndVarSimplify.cpp |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletion(-)
>
>
> Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
> diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.123 llvm/ 
> lib/Transforms/Scalar/IndVarSimplify.cpp:1.124
> --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.123       Tue Jun 19  
> 09:28:31 2007
> +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp     Wed Jun 27  
> 04:50:26 2007
> @@ -519,8 +519,11 @@
>    DOUT << "INDVARS: New CanIV: " << *IndVar;
>
>    if (!isa<SCEVCouldNotCompute>(IterationCount)) {
> -    if (IterationCount->getType() != LargestType)
> +    if (IterationCount->getType()->getPrimitiveSizeInBits() <
> +        LargestType->getPrimitiveSizeInBits())
>        IterationCount = SCEVZeroExtendExpr::get(IterationCount,  
> LargestType);
> +    else if (IterationCount->getType() != LargestType)
> +      IterationCount = SCEVTruncateExpr::get(IterationCount,  
> LargestType);
>      if (Instruction *DI = LinearFunctionTestReplace(L,  
> IterationCount,Rewriter))
>        DeadInsts.insert(DI);
>    }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to