[PATCH] D87034: [KnownBits] Implement accurate unsigned and signed max and min
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 2 11:40:47 PDT 2020
nikic added inline comments.
================
Comment at: llvm/include/llvm/Support/KnownBits.h:178
+ /// value is known to be greater than or equal to Val.
+ KnownBits makeGE(APInt Val) const;
+
----------------
`const APInt &`?
================
Comment at: llvm/lib/Support/KnownBits.cpp:113
+ LHSgeRHS.setLowBits(BitWidth - LHSgtRHS.countLeadingZeros());
+ if (LHSgeRHS.isAllOnesValue()) {
+ Res.Zero |= LHS.Zero;
----------------
How does this differ from `LHS.getMinValue().uge(RHS.getMaxValue())`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87034/new/
https://reviews.llvm.org/D87034
More information about the llvm-commits
mailing list