llvm-project
1832d609 - InstCombine/Demanded: simplify srem case (NFC) (#110260)

Commit
1 year ago
InstCombine/Demanded: simplify srem case (NFC) (#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.
Author
Parents
Loading