[PATCH] D139818: [IndVars][NFCI] Avoid supposedly redundant query to save some CT
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 01:46:02 PST 2022
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1388
+ if (SE->isKnownPredicate(Pred, LHSS, RHSS, BI)) {
+ foldExit(L, ExitingBB, /*IsTaken*/ false, DeadInsts);
return true;
----------------
nikic wrote:
> If I put an `assert(*EV)` here, I get an assertion failure in llvm/test/Transforms/IndVarSimplify/2014-06-21-congruent-constant.ll. So it looks like this can trigger. Unfortunately this is a test chock full of UB, but maybe it's possible to extract a more meaningful test from it?
Failing assertion doesn't mean it can't be optimized by other means, but need more study.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139818/new/
https://reviews.llvm.org/D139818
More information about the llvm-commits
mailing list