[PATCH] D157755: [InstSimplify] Use knownbits for simplifying `(icmp ugt/ule (or X, Y), X)`; PR64610
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 12 10:11:51 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:3135-3140
+ // Get NOT of knownbits by swapping ones/zeros
+ std::swap(RHSKnown.One, RHSKnown.Zero);
+ KnownBits UniqueBits = RHSKnown & YKnown;
+ // We know there is a unique bit so equality conditions cannot be
+ // false.
+ if (UniqueBits.isNonZero())
----------------
nikic wrote:
>
Is that right. It's really 'have a common bit not set', it's okay if there are some though
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157755/new/
https://reviews.llvm.org/D157755
More information about the llvm-commits
mailing list