[PATCH] D34117: PR32632 Add a case to remove loop compare

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 15:13:45 PDT 2017


efriedma added a comment.

I'm not convinced it makes sense to invest any effort into loops with a backedge-taken count of zero.  Yes, maybe we simplify the exit condition slightly earlier, but does that actually do us any good in practice?

> There are other cases, that could be caught by BECount - should we remove them from "isKnownPredicate"?

I don't think there's any other code in isKnownPredicate that specifically checks for exit conditions? Not all comparisons against an AddRec are checks which exit the loop.


Repository:
  rL LLVM

https://reviews.llvm.org/D34117





More information about the llvm-commits mailing list