[llvm-commits] [llvm] r49928 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Nick Lewycky
nicholas at mxc.ca
Sat Apr 19 17:22:00 PDT 2008
Chris Lattner wrote:
> Shouldn't this just be:
>
> case ICmpInst::ICMP_ULT: {
> SCEVHandle TC = HowManyLessThans(LHS, RHS, L, false);
> if (!isa<SCEVCouldNotCompute>(TC)) return TC;
> break;
> }
> case ICmpInst::ICMP_UGT: {
> SCEVHandle TC = HowManyLessThans(RHS, LHS, L, false);
> if (!isa<SCEVCouldNotCompute>(TC)) return TC;
> break;
> }
>
> x > y --> y < x
The first thing HowManyLessThans does is notice that your the RHS isn't
loop invariant and give up.
Nick
More information about the llvm-commits
mailing list