[PATCH] D157801: [ValueTracking] Use predicates for incoming phi-edges to deduce non-zero
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 13 01:02:37 PDT 2023
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
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.
----------------
`if (TrueSucc != FalseSucc)` would be less confusing, I think?
================
Comment at: llvm/test/Transforms/JumpThreading/phi-known.ll:1
; RUN: opt -S -passes=jump-threading %s | FileCheck %s
----------------
Please pre-commit regenerating this test with UTC.
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