[llvm-commits] [llvm] r49928 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Dale Johannesen dalej at apple.com
Sat Apr 19 17:32:04 PDT 2008


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....




More information about the llvm-commits mailing list