2 Commits

Author SHA1 Message Date
Noah Goldstein
4fd3401e76 [KnownBits] Improve implementation of KnownBits::abs
`abs` preserves the lowest set bit, so if we know the lowest set bit,
set it in the output.

As well, implement the case where the operand is known negative.

Reviewed By: foad, RKSimon

Differential Revision: https://reviews.llvm.org/D150100
2023-05-23 13:52:39 -05:00
Noah Goldstein
261e5d0951 [ValueTracking] Add tests for knownbits of abs; NFC
Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D150099
2023-05-16 18:58:13 -05:00