[PATCH] D43175: [SCEV] Favor isKnownViaSimpleReasoning over constant ranges check

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 22:31:29 PST 2018

sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.


You may want to indicate the range of `inc` in the commit message; otherwise it looks like we're introducing a miscompile. :)

Comment at: lib/Analysis/ScalarEvolution.cpp:8962
-  if (isKnownPredicateViaConstantRanges(Pred, LHS, RHS))
+  if (isKnownViaSimpleReasoning(Pred, LHS, RHS))
     return true;
I think it is better to call this `isKnownViaNonRecursiveReasoning` since "simple" is not very descriptive (if you agree can you please directly land that in a subsequent change?).

Comment at: test/Transforms/IndVarSimplify/loop-invariant-conditions.ll:144
 !0 = !{i64 0, i64 100}
Let's move this to the bottom of the file.


More information about the llvm-commits mailing list