2 Commits

Author SHA1 Message Date
Noah Goldstein
8a60814ed5 [ValueTracking] Use KnownBits functions for computeKnownBits of saturating add/sub functions
The knownbits implementation covers all the cases previously handled
by `uadd.sat`/`usub.sat` as well some additional ones. We previously
were not handling the `ssub.sat`/`sadd.sat` cases at all.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D150103
2023-05-23 13:52:40 -05:00
Noah Goldstein
1e963b4081 [ValueTracking] Add tests for knownbits of saturating add/sub functions; NFC
Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D150101
2023-05-23 13:52:39 -05:00