[PATCH] D120651: [SCEV] Only verify BECounts for reachable loops (PR50523)
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 01:37:04 PST 2022
mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:13465
+ // any BECount is legal.
+ if (!ReachableBlocks.contains(L->getHeader()))
+ continue;
----------------
nikic wrote:
> mkazantsev wrote:
> > Why not just use `DT->isReachableFromEntry(L->getHeader())`?
> The problematic case is `br i1 false` style branches, for which you added special handling in isImpliedCond(). The blocks are reachable in the DT, which does not special-case constant branch conditions.
Got it, thanks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120651/new/
https://reviews.llvm.org/D120651
More information about the llvm-commits
mailing list