Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InstCombine/Demanded: simplify srem case (NFC) (llvm#110260)
The srem case of SimplifyDemandedUseBits partially duplicates KnownBits::srem. It is guarded by a statement that takes the absolute value of the RHS and checks whether it is a power of 2, but the abs() call here useless, since an srem with a negative RHS is flipped into one with a positive RHS, adjusting LHS appropriately. Stripping the abs call allows us to call KnownBits::srem instead of partially duplicating it.
- Loading branch information