[PATCH] D149421: [KnownBits] Improve `KnownBits::rem(X, Y)` in cases where we can deduce low-bits of output
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 10:34:32 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Support/KnownBits.cpp:549
+static KnownBits remGetLowBits(const KnownBits &Known, const KnownBits &LHS,
+ const KnownBits &RHS) {
----------------
RKSimon wrote:
> goldstein.w.n wrote:
> > RKSimon wrote:
> > > Do we need Known?
> > Yeah. We don't have a "merge" function (to take known results from A and apply them to B).
> > There was a bit of conversation below (around L580) about it.
> But do we need a merge? All the calls to remGetLowBits are at the start when Known is empty
Oh yeah. My feeling there was the API should work on arbitrary state, not just init state. Otherwise just seems like a bug waiting to happen.
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