[PATCH] D88210: [IndVars] Use knowledge about execution on last iteration when removing checks

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 02:03:15 PDT 2020


ebrevnov added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2448
+      else if (SkipLastIter)
+        // If we cannot prove it on the last loop iteration, try to benefit
+        // from the fact that this check will not be executed on the last
----------------
Please rework the comment so it is crystal clear that we actually call OptimizeCond for both MaxIter and MaxIter -1. And the reason is implementation limitation in SCEV which is unable to prove that MaxIter-1 < MaxIter.


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

https://reviews.llvm.org/D88210



More information about the llvm-commits mailing list