[all-commits] [llvm/llvm-project] 1832d6: InstCombine/Demanded: simplify srem case (NFC) (#1...
Ramkumar Ramachandra via All-commits
all-commits at lists.llvm.org
Fri Sep 27 11:12:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1832d609f7e7d5511bb0401a30ed1cf4f49dd00b
https://github.com/llvm/llvm-project/commit/1832d609f7e7d5511bb0401a30ed1cf4f49dd00b
Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: 2024-09-27 (Fri, 27 Sep 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Log Message:
-----------
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list