[PATCH] D149421: [KnownBits] Improve `KnownBits::rem(X, Y)` in cases where we can deduce low-bits of output
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 09:48:09 PDT 2023
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM with a minor
================
Comment at: llvm/lib/Support/KnownBits.cpp:568
// The upper bits are all zero, the lower ones are unchanged.
+ // NB: Low bits set in `remGetLowBits`.
APInt LowBits = RHS.getConstant() - 1;
----------------
// NB: Low one bits set in `remGetLowBits`
================
Comment at: llvm/lib/Support/KnownBits.cpp:588
// The low bits of the first operand are unchanged by the srem.
+ // NB: Low bits set in `remGetLowBits`.
APInt LowBits = RHS.getConstant() - 1;
----------------
// NB: Low one bits set in `remGetLowBits`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149421/new/
https://reviews.llvm.org/D149421
More information about the llvm-commits
mailing list