[llvm-commits] [llvm] r49928 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
clattner at apple.com
Sat Apr 19 17:38:57 PDT 2008
On Apr 19, 2008, at 5:32 PM, Dale Johannesen wrote:
>
> On Apr 19, 2008, at 5:22 PM, Nick Lewycky wrote:
>
>> 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
>
> First thing I tried, but:
>
>> The first thing HowManyLessThans does is notice that your the RHS
>> isn't
>> loop invariant and give up.
>>
>> Nick
>
> Yep.
> I then considered adding HowManyGreaterThans but it turns out UMin
> isn't there either....
Ah ok, good catch :). I don't think howfartozero is safe to use in
any case. If it were, we could just use it in the ULT case too, right?
-Chris
More information about the llvm-commits
mailing list