[PATCH] D59475: [ConstantRange] Add fromKnownBits() method
    Nikita Popov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Mar 17 14:31:18 PDT 2019
    
    
  
nikic marked 2 inline comments as done.
nikic 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);
----------------
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.
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