[KnownBits] Add implementation for `KnownBits::sdiv`
authorNoah Goldstein <goldstein.w.n@gmail.com>
Sun, 7 May 2023 01:58:08 +0000 (20:58 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 16 May 2023 23:58:12 +0000 (18:58 -0500)
commit8c569c922bc5bbe9fb67ff3ff3ac28e17b012360
treebd1a9c7178b906a26bcac9c709aed88f024f013d
parent53a079c8f723ca6a33c76a4818d47a66fd65ca38
[KnownBits] Add implementation for `KnownBits::sdiv`

Can figure out some of the upper bits (similiar to `udiv`) if we know
the sign of the inputs.

As well, if we have the `exact` flag we can sometimes determine some
low-bits.

Differential Revision: https://reviews.llvm.org/D150093
llvm/include/llvm/Support/KnownBits.h
llvm/lib/Support/KnownBits.cpp
llvm/unittests/Support/KnownBitsTest.cpp