[llvm-commits] [llvm] r49928 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
clattner at apple.com
Sat Apr 19 18:38:37 PDT 2008
On Apr 19, 2008, at 6:22 PM, Dale Johannesen wrote:
>>> If you continue with the thread you see Nick has that concern also.
>>> It is true that the SCEV expression isn't right in that case if the
>>> loop is never supposed to be executed, but so far every case I've
>>> seen
>>> has a guard test outside the loop proper, so I believe everything
>>> works (the test I checked in exercises this case).
>>
>> This may be true for while/for loops, but isn't true for do+while
>> loops.
>>
>> do {
>> ...
>> } while (cond);
>>
>> Has no dominating check.
>
> But those are not executed 0 times, so the failing case can't arise.
> It works in practice, too.
The count is for the number of times the backedge is executed, not the
number of times the loop is executed, right?
-Chris
More information about the llvm-commits
mailing list