[PATCH] D149413: [ValueTracking] Add logic for `isKnownNonZero(usub.sat X, Y)`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 14:31:20 PDT 2023


goldstein.w.n added a comment.

In D149413#4304537 <https://reviews.llvm.org/D149413#4304537>, @nikic wrote:

> This case looks unnecessary. If `%x >= %y` we will fold the usub.sat to `sub nuw %x, %y` and not hit this pattern.

Most likely yeah. My feeling is it might exist outside of `InstCombine` and need to be analyzed. I.e if its analyzable in `InstSimplify`
it may enable further simplifications of patterns we don't want to have to duplicate in `InstCombine`.

But if you're not convinced ill abandon.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149413/new/

https://reviews.llvm.org/D149413



More information about the llvm-commits mailing list