[PATCH] D149421: [KnownBits] Improve `KnownBits::rem(X, Y)` in cases where we can deduce low-bits of output
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 11:04:00 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Support/KnownBits.cpp:549
+static KnownBits remGetLowBits(const KnownBits &Known, const KnownBits &LHS,
+ const KnownBits &RHS) {
----------------
goldstein.w.n wrote:
> 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.
As this is a private API, I don't think there's a need to generalize it to a use case that currently doesn't exist...
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