[llvm] [SCEV] Fix incorrect NUW inference (PR #70521)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 10:18:04 PDT 2023
================
@@ -12637,6 +12637,11 @@ ScalarEvolution::howManyLessThans(const SCEV *LHS, const SCEV *RHS,
const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(ZExt->getOperand());
if (AR && AR->getLoop() == L && AR->isAffine()) {
auto canProveNUW = [&]() {
+ // We can use the comparison to infer no-wrap flags only it fully
----------------
nikic wrote:
```suggestion
// We can use the comparison to infer no-wrap flags only if it fully
```
https://github.com/llvm/llvm-project/pull/70521
More information about the llvm-commits
mailing list