[PATCH] D25682: [LoopUnroll] Keep the loop test only on the first iteration of max-or-zero loops
silviu.baranga@arm.com via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 06:50:57 PDT 2016
sbaranga added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:5741
MustExitMaxBECount = EL.MaxNotTaken;
- else {
+ MustExitMaxOrZero = EL.MaxOrZero;
+ } else {
----------------
john.brawn wrote:
> sbaranga wrote:
> > Does this work with more than one loop exit and with predicated loop exits?
> >
> > I'm not certain this would hold if we have at least one loop exit that doesn't dominate the latch, given the very strict definition (the backedge gets taken exactly 0 or MaxNotTaken times).
> That's handled down on line 5759 - MaxOrZero is set to false on loops with more than one exit.
Good point, I've missed that. It should be fine then.
Repository:
rL LLVM
https://reviews.llvm.org/D25682
More information about the llvm-commits
mailing list