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

Chris Lattner clattner at apple.com
Sat Apr 19 18:39:34 PDT 2008


On Apr 19, 2008, at 6:21 PM, Nick Lewycky wrote:
>>> Another possibility is to remove the UGT case entirely, which was my
>>> first suggestion.  If you do that the preheader in my test is 2
>>> instructions, compared to 4 for what's checked in now and 7 for  
>>> Nick's
>>> alternative.
>>> I don't imagine that's a win across the board, but I suspect simple
>>> loops like this are more common than the more complicated ones where
>>> this optimization is a winner.....
>>
>> If we are currently producing incorrect code for the UGT case, I'd be
>> strongly in favor of disabling it entirely.  This turns a
>> miscompilation bug into a missed optimization bug.  Seem reasonable
>> Nicholas?
>
> Or were you proposing that we stop analyzing UGT loops entirely?

Yes.

> If you
> do, you should make sure you disable ULT, SGT and SLT analysis too  
> since
> they have the exact same problem of an extra branch that the UGT  
> case has.

Huh?

-Chris



More information about the llvm-commits mailing list