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

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 00:38:16 PDT 2018


mkazantsev added a comment.

Will do.



================
Comment at: lib/Analysis/ScalarEvolution.cpp:9585
+        continue;
+      assert(dominates(LHS, IncBB) && "Dominance broken?");
+      const SCEV *R = getSCEV(RPhi->getIncomingValueForBlock(IncBB));
----------------
anna wrote:
> mkazantsev wrote:
> > This may fail if LHS is also a Phi from the same BB, but not a SCEVUnknown. It seems that it should be a check instead of assert.
> I don't get this comment. We already finished checking that LHS is a phi in the above 2 cases in if-else ladder.
This comment relates to old version of this patch and is no longer relevant. :)


https://reviews.llvm.org/D44001





More information about the llvm-commits mailing list