[PATCH] D157755: [InstSimplify] Use knownbits for simplifying `(icmp ugt/ule (or X, Y), X)`; PR64610
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 12 06:54:53 PDT 2023
nikic 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())
----------------
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