[PATCH] D108848: [LoopDeletion] Separate logic in breakBackedgeIfNotTaken using symboic max trip count [nfc]
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 17 11:29:49 PST 2022
reames added a comment.
Well, it turns out the answer is that I'm a bloody idiot. The code is definitely wrong, not sure why I didn't notice this before.
The issue is that we use isKnownNonZero to filter the canProveOnFirstIteration call. This filtering depends on a *lower bound* of the actual trip count. My change passed an *upper bound*. That results in us failing to call canProveOnFirstIteration for cases we can prove a loop exit is taken.
Working on a fix now. May end up just reverting depending on whether the fix is reasonable clean on the newer code or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108848/new/
https://reviews.llvm.org/D108848
More information about the llvm-commits
mailing list