[PATCH] D46046: [SCEV] Do not use induction in isKnownPredicate for simplification umax

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 02:11:00 PDT 2018


skatkov added a comment.

In https://reviews.llvm.org/D46046#1077768, @javed.absar wrote:

> Would removing 'isKnownViaInduction' have any impact of the number of cases 'analyzeable by scev?


As I understand it should not.
We will not be able to simplify umax in case it could be simplified before due to usage of induction but late analysis should not in general suffer from that.

But let's wait for Sanjoy's opinion on that.



================
Comment at: lib/Analysis/ScalarEvolution.cpp:8729
+
+bool ScalarEvolution::isKnownPredicateWithoutInductionHelper(
+    ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS) {
----------------
javed.absar wrote:
> Hi Serguei. 
> 
> I tried to trace the split and code duplication, and I think it would probably be simpler to combine  'isKnownPredicateWithoutInduction' and 'isKnownPredicateWithoutInductionHelper' into just one function (if that's possible).
Are you ok that we will have a code duplication in isKnownPredicateWithoutInduction and isKnownPredicate?


https://reviews.llvm.org/D46046





More information about the llvm-commits mailing list