aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <ramkumar.ramachandra@codasip.com>2024-09-27 19:12:35 +0100
committerGitHub <noreply@github.com>2024-09-27 19:12:35 +0100
commit1832d609f7e7d5511bb0401a30ed1cf4f49dd00b (patch)
tree89edbe8be97785811bbc64206fbc07b007f0fe9f /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
parentcce52c76a7382ca370097efad0ec8b3859796c7a (diff)
downloadllvm-1832d609f7e7d5511bb0401a30ed1cf4f49dd00b.zip
llvm-1832d609f7e7d5511bb0401a30ed1cf4f49dd00b.tar.gz
llvm-1832d609f7e7d5511bb0401a30ed1cf4f49dd00b.tar.bz2
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.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
0 files changed, 0 insertions, 0 deletions