[PATCH] D44001: [SCEV] Prove implications for SCEVUnknown Phis

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 06:59:30 PDT 2018


anna added inline comments.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:9643
+  } else {
+    // In all other cases go over inputs of LHS and compare each of them to RHS,
+    // the predicate is true for (LHS, RHS) if it is true for all such pairs.
----------------
mkazantsev wrote:
> anna wrote:
> > Could you state here: `LHS is phi and RHS is non-phi`. It's obvious when looking at above code and the swapping, but easier when seeing this as a standalone third case.
> It is not utterly correct: RHS can be a Phi either SCEVUnknown or AddRec, but from different block than LPhi.
ah you're right. It can be a phi from a different block, just that at the point of `LBB`, it will be exactly one value.


https://reviews.llvm.org/D44001





More information about the llvm-commits mailing list