[llvm-commits] [llvm] r53508 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll

Nick Lewycky nicholas at mxc.ca
Mon Jul 14 20:40:48 PDT 2008


Dan Gohman wrote:
> On Jul 12, 2008, at 12:41 AM, Nick Lewycky wrote:
>> +  if (!PreCondLHS->getType()->isInteger()) return false;
> 
> This check looks redundant; a ICMP_[SU][LG]T that's used by a  
> conditional
> branch will always have integer operands. Can you make this an assert
> instead?

No, it could be a icmp between two pointers.

>> +
>> +  return LHS == getSCEV(PreCondLHS) && RHS == getSCEV(PreCondRHS);
>> +}
>> +
>> /// HowManyLessThans - Return the number of times a backedge  
>> containing the
>> /// specified less-than comparison will execute.  If not computable,  
>> return
>> /// UnknownValue.
>> @@ -2640,12 +2708,17 @@
>>
>>     // Then, we get the value of the LHS in the first iteration in  
>> which the
>>     // above condition doesn't hold.  This equals to max(m,n).
> 
> This comment is now stale. Can you update it to reflect the
> new logic?

Done!

Nick




More information about the llvm-commits mailing list