Commit Graph

2 Commits

Author SHA1 Message Date
Max Kazantsev c913dccfde [SCEV] Use lshr in implications
This patch adds support for implication inference logic for the
following pattern:
```
  lhs < (y >> z) <= y, y <= rhs --> lhs < rhs
```
We should be able to use the fact that value shifted to right is
not greater than the original value (provided it is non-negative).

Differential Revision: https://reviews.llvm.org/D116150
Reviewed-By: apilipenko
2022-01-25 13:25:19 +07:00
Max Kazantsev 958e7a284d [Test] Add test showing missing opportunity in IndVar's handling of lshr 2021-12-22 15:08:22 +07:00