[PATCH] D140851: [Patch 3/4]: Add cases for assume (X & Y != {0|Y})
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 5 10:52:33 PST 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:950
+ KnownBits AKnown = computeKnownBits(A, Depth + 1, QueryNoAC)
+ .anyextOrTrunc(BitWidth);
+ if (AKnown.isZero()) {
----------------
nikic wrote:
> goldstein.w.n wrote:
> > nikic wrote:
> > > This should just check whether A is zero, no need to compute known bits.
> > > This should just check whether A is zero, no need to compute known bits.
> >
> > How can I check if a value is known zero w.o `computeKnownBits`? I see `isKnownNonZero` but not the inverse.
> `match(A, m_Zero())` would be the usual way.
> `match(A, m_Zero())` would be the usual way.
Won't that only match `Constant` types? Could miss a case no?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140851/new/
https://reviews.llvm.org/D140851
More information about the llvm-commits
mailing list