[PATCH] D59475: [ConstantRange] Add fromKnownBits() method
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 17 14:42:26 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/IR/ConstantRange.cpp:58-59
+ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known,
+ bool IsSigned) {
+ if (Known.isUnknown())
+ return ConstantRange(Known.getBitWidth(), /* full */ true);
----------------
nikic wrote:
> lebedev.ri wrote:
> > Last-minute thought: should there be a `assert(!Known.hasConflict() && "Expected valid KnownBits");` ?
> > The used methods of `KnownBits` won't assert that by themselves..
> I've added this assertion in rL356346.
Thanks
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59475/new/
https://reviews.llvm.org/D59475
More information about the llvm-commits
mailing list