[PATCH] D75055: [ValueLattice] Merging a constant range with undefined is overdefined.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 11:53:52 PST 2020


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


================
Comment at: llvm/include/llvm/Analysis/ValueLattice.h:261
+      // that for constants (or single-element ranges), we will replace all uses
+      // and we can assume undef == other constant.
+      if (isConstantRange() && !getConstantRange().isSingleElement()) {
----------------
nikic wrote:
> I don't think this reasoning holds up for LVI. While we *could* replace all uses, nothing actually forces consumers of LVI to do so. And in practice, I don't believe that either JumpThreading or CVP will replace all constant lattice values. JT only looks at br/switch and CVP mostly does range-based simplifications.
Ah right, we might have to convey if folding will happen or not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75055





More information about the llvm-commits mailing list