[PATCH] D144050: [SCEV] Strengthen nowrap flags via ranges for ARs on construction.
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 22:05:03 PST 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5739
+ (SCEV::NoWrapFlags)(AR->getNoWrapFlags() |
+ proveNoWrapViaConstantRanges(AR)));
+ }
----------------
fhahn wrote:
> mkazantsev wrote:
> > Should we update `Flags` here to have more optimistic flags for `BEInst`?
> I tried to do that in D144197, but it seems the only change is a single regression; I've not looked into it in detail so far though.
It's not exactly what I mean, I mean smth like
```
if (auto *AR = dyn_cast<SCEVAddRecExpr>(PHISCEV)) {
Flags = Flags | proveNoWrapViaConstantRanges(AR);
setNoWrapFlags(const_cast<SCEVAddRecExpr *>(AR), Flags);
}
// further on, updated Flags is used, see line 5749.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144050/new/
https://reviews.llvm.org/D144050
More information about the llvm-commits
mailing list