[PATCH] D139934: [IndVars] Apply more optimistic SkipLastIter for AND/OR conditions
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 02:00:10 PST 2023
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1489
+ auto *WideMaxIter = SE->getNoopOrZeroExtend(MaxIter, WiderType);
+ if (SE->isKnownPredicate(ICmpInst::ICMP_EQ, WideExitMax, WideMaxIter))
+ ICmpsFailingOnLastIter.insert(ICmp);
----------------
Would just `WideExitMax == WideMaxIter` be sufficient? Don't think we usually use isKnownPredicate for equality comparisons and rely on canonicalization instead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139934/new/
https://reviews.llvm.org/D139934
More information about the llvm-commits
mailing list