[llvm-commits] [llvm] r49928 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Apr 18 21:27:09 PDT 2008
Hi Dale,
I don't think this is right. The correct fix is to replace
getNegativeSCEV with getNotSCEV.
Nick
Dale Johannesen wrote:
> Author: johannes
> Date: Fri Apr 18 16:38:31 2008
> New Revision: 49928
>
> URL: http://llvm.org/viewvc/llvm-project?rev=49928&view=rev
> Log:
> Fix a scalar evolution bug. Reversing everything
> does not work because of 0; 2>0 but -2U is also >0.
>
>
> Modified:
> llvm/trunk/lib/Analysis/ScalarEvolution.cpp
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=49928&r1=49927&r2=49928&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Fri Apr 18 16:38:31 2008
> @@ -1980,8 +1980,7 @@
> break;
> }
> case ICmpInst::ICMP_UGT: {
> - SCEVHandle TC = HowManyLessThans(SE.getNegativeSCEV(LHS),
> - SE.getNegativeSCEV(RHS), L, false);
> + SCEVHandle TC = HowFarToZero(SE.getMinusSCEV(LHS, RHS), L);
> if (!isa<SCEVCouldNotCompute>(TC)) return TC;
> break;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list