Files
clang-p2996/llvm/lib/Support/KnownBits.cpp
Noah Goldstein 85378b7663 [KnownBits] Factor out and improve the lowbit computation for {u,s}div
There are some new cases if the division is `exact`:
    1: If `TZ(LHS) == TZ(RHS)` then the result is always Odd
    2: If `TZ(LHS) > TZ(RHS)` then the `TZ(LHS)-TZ(RHS)` bits of the
       result are zero.
Proofs: https://alive2.llvm.org/ce/z/3rAZqF

As well, return zero in known poison cases to be consistent rather
than just working about the bits we are changing.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D150923
2023-06-06 15:14:10 -05:00

34 KiB