[PATCH] D44553: [SCEV] Re-land: Fix isKnownPredicate

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 18 21:39:09 PDT 2018


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

LGTM with nits. I've also run this test via our Fuzzer testing and it didn't detect any failures, so I think it's fine now.



================
Comment at: lib/Analysis/ScalarEvolution.cpp:8747
+            isAvailableAtLoopEntry(SplitRHS.first, MDL)) {
+          if (isLoopEntryGuardedByCond(MDL, Pred, SplitLHS.first,
+                                       SplitRHS.first) &&
----------------
It could be one if with && conditions, but it's up to you.


================
Comment at: test/Transforms/IndVarSimplify/inner-loop-by-latch-cond.ll:22
+  %s = select i1 %cmp, i64 %j, i64 %i
+  call void @foo(i64 %s)
+  %j.next = add nuw nsw i64 %j, 1
----------------
How about adding check that `@foo` is called with `%j`?



https://reviews.llvm.org/D44553





More information about the llvm-commits mailing list