[PATCH] D152773: [SCCP] Propagate undef when visiting some instructions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 01:28:29 PDT 2023


nikic added a reviewer: fhahn.
nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:1246
+                 ValueLatticeElement::getRange(
+                     Res, OpSt.isConstantRangeIncludingUndef()));
   } else
----------------
Hm, this seems a bit inaccurate, in that something like `zext i32 undef to i64` will still produce a value where the top bits are all zero, not undef. This would be more precisely modeled by treating undef as a full-set input. But then we would no longer model the case where undef doesn't matter as accurately...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152773



More information about the llvm-commits mailing list