[PATCH] D59959: [ConstantRange] Add unsigned intersection type

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 15:48:15 PDT 2019


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: llvm/unittests/IR/ConstantRangeTest.cpp:400
 
         assert(!HaveInterrupt3 && "Should have at most three ranges");
 
----------------
lebedev.ri wrote:
> This looks inconsistent?
> `"Should have at most *two* ranges"` maybe?
While the intersection consists of at most two ranges in the sense of potentially wrapping ConstantRanges, if we're using a non-wrapping representation (as is the case in this testing code), then there may be three ranges. An example:

    ----]    [---]   [----   Two ConstantRanges
    [---]    [---]   [---]   Three non-wrapping ranges


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59959/new/

https://reviews.llvm.org/D59959





More information about the llvm-commits mailing list