[PATCH] D44676: [SCEV] Make exact taken count calculation more optimistic
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 22 16:27:22 PDT 2018
fhahn added inline comments.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:6673
+ // All exits we have collected must dominate the only latch.
+ if (!Latch)
+ return SE->getCouldNotCompute();
----------------
Another thing to double check. Are you sure we only compute exit counts when we have a single loop latch that dominates all exiting nodes? I had a quick look but could not find the place where we ensure that (computeBackedgeTakenCount states that the loop latch may be null). In that case we might miss a case when all exit counts are equal.
https://reviews.llvm.org/D44676
More information about the llvm-commits
mailing list