[llvm] [SCEV] Use Step and Start to check if SCEVWrapPredicate is implied. (PR #118184)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 06:03:25 PST 2024
================
@@ -14934,10 +14936,52 @@ SCEVWrapPredicate::SCEVWrapPredicate(const FoldingSetNodeIDRef ID,
const SCEVAddRecExpr *SCEVWrapPredicate::getExpr() const { return AR; }
-bool SCEVWrapPredicate::implies(const SCEVPredicate *N) const {
+bool SCEVWrapPredicate::implies(const SCEVPredicate *N,
+ ScalarEvolution &SE) const {
const auto *Op = dyn_cast<SCEVWrapPredicate>(N);
+ if (!Op)
+ return false;
+
+ if (setFlags(Flags, Op->Flags) != Flags)
----------------
fhahn wrote:
It looks like it the moment flags are either `SCEVWrapPredicate::IncrementNSSW` or `SCEVWrapPredicate::IncrementNUSW` and never both. Left as is for now.
https://github.com/llvm/llvm-project/pull/118184
More information about the llvm-commits
mailing list