Breaking out the isKnownNonNegative helper function from D45439. The reason why isKnownNegative was seemingly eeded was because I was using the UGE predicate as well as SGE...
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Code part is fine (with a nit inline). Do you have a test for which this change enabled IRCE? If yes, please add.
| lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp | ||
|---|---|---|
| 809 ↗ | (On Diff #141817) | You can use SE.getZero(BoundSCEV->getType()). |
| lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp | ||
|---|---|---|
| 807 ↗ | (On Diff #141817) | How about isKnownNonNegativeInLoop? |
Comment Actions
LGTM after you address the nits; if there is a test which shows that IRCE now works where it didn't, I highly encourage you to add it. But even if not, this change is obviously profitable.