[PATCH] D148107: [SCEV] Set nowrap for finite non-strict predicates for addrecs

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 10:49:35 PDT 2023


reames added a comment.

I don't think this holds.  I think it would hold if you were adding to LHS, but RHS is an unrelated loop invariant value.

What prevents this:
if (rhs + 1 would not overflow) {

  for (int i = 0; i < rhs; i++) { ... }

}
else {

  use (rhs+1).

}


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

https://reviews.llvm.org/D148107



More information about the llvm-commits mailing list