[PATCH] D106852: [SCEV] Fix getAddExpr for adding loop invariants into start of some AddRec
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 4 21:13:27 PDT 2021
mkazantsev added a comment.
> a+1 wouldn't be nsw? And in fact, that's what getAddExpr currently does. I don't see how that's a contradiction.
Imagine that the point where `b` is defined is also guarded by other conditions. In particular, this very place can be guarded by `a != SINT_MAX`. We could put the `<nsw>` only because we took all these guards into consideration. In this case, `a+1+b-b<nsw>` implies `a+1<nsw>` *only at the point where `b` is defined* and nowhere else. But there is no way to specify this, right?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106852/new/
https://reviews.llvm.org/D106852
More information about the llvm-commits
mailing list