[PATCH] D157801: [ValueTracking] Use predicates for incoming phi-edges to deduce non-zero
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 13 10:30:51 PDT 2023
goldstein.w.n marked an inline comment as done.
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2685
+ // Check for cases of duplicate successors.
+ if ((TrueSucc == PN->getParent()) != (FalseSucc == PN->getParent())) {
+ // If we're using the false successor, invert the predicate.
----------------
nikic wrote:
> `if (TrueSucc != FalseSucc)` would be less confusing, I think?
This is cut/paste from the knownbits codes. Would rather just add NFC follow up to both of these two update to less confusing logic (and will do so unless you object).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157801/new/
https://reviews.llvm.org/D157801
More information about the llvm-commits
mailing list