[PATCH] D73240: [ValueLattice] Update markConstantRange to return false for subset ranges.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 19:12:56 PST 2020


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


================
Comment at: llvm/include/llvm/Analysis/ValueLattice.h:252
     if (isConstantRange()) {
+      if (getConstantRange().contains(NewR))
+        return false;
----------------
efriedma wrote:
> If NewR is precisely equal to the current range, it makes sense to do nothing.  It doesn't make sense to call markConstantRange with a NewR that's a subset of the current range. 
Right, I've restricted the acceptable values of NewR and also updated the description.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73240





More information about the llvm-commits mailing list