[PATCH] D67408: [IndVars] An implementation of loop predication without a need for speculation

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 09:07:16 PDT 2019


reames marked 2 inline comments as done.
reames added inline comments.


================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:2824
+  // is that enough for *all* side effects?
+  for (BasicBlock *BB : L->blocks())
+    for (auto &I : *BB)
----------------
ebrevnov wrote:
> Did you consider adding support for llvm.experimental.widenable.condition in this or one of the next patches? My understanding is semantics of llvm.experimental.widenable.condition allows us to assume that exist is taken on the first hit thus we can ignore side effects and live outs coming from the code dominated by the intrinsic.
WC is a planned follow up.  It's a little tricky because the way we structure the WC comparisons currently breaks getExitCount and getBackedgeTakenCount.  I definitely want this landed and tested before I start making any of the tweaks for WC.


================
Comment at: test/Transforms/IndVarSimplify/loop-predication.ll:714
+
+; TODO: We're failing to compute an exit count for the bounds check.
+; From some quick analysis, it looks like we don't handle -1 step
----------------
ebrevnov wrote:
> Any plan to support that soon?
At some point.  If it's a case which bites someone, I'll prioritize it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67408/new/

https://reviews.llvm.org/D67408





More information about the llvm-commits mailing list