[PATCH] D45439: [IRCE] Use NUW flag for indvar

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 15 18:09:56 PDT 2018


mkazantsev requested changes to this revision.
mkazantsev added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:894
+  auto HasNoWrap = [&](const SCEVAddRecExpr *AR) {
+    if (AR->hasNoSelfWrap())
       return true;
----------------
This is incorrect. If counter value goes from `-1` to `(SINT_MAX + 1)` (both included), it has both signed and unsigned wrap and has no self-wrap.


https://reviews.llvm.org/D45439





More information about the llvm-commits mailing list