[PATCH] D143409: [SCEV][IndVarSimplify] Support known dominating slt/ult elimination

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 10:36:28 PST 2023


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11118
+        isKnownNonNegative(RHS) &&
+        isBasicBlockEntryGuardedByCond(CtxI->getParent(), SignFlippedPred, LHS,
+                                       RHS)) {
----------------
Why not `isKnownPredicateAt(SignFlippedPred, LHS, RHS, CtxI)`? It may also take assumes in current block into consideration.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:756
+         (isa<ShlOperator>(BO) && strengthenRightShift(BO, IVOperand));
+}
+
----------------
How is that related to what the patch claims to do?  Should it be a separate patch with separate tests?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143409/new/

https://reviews.llvm.org/D143409



More information about the llvm-commits mailing list