[PATCH] D73181: [SCEV] Use backedge SCEV of PHI only if its input is loop invariant

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 11:07:37 PST 2020


dantrushin marked an inline comment as done.
dantrushin added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8254
+            if (IsLoopInvariantValue(BackedgeVal, LI) &&
+                IsAvailableOnEntry(LI, DT, OnBackedge, PN->getParent()))
               return OnBackedge;
----------------
sanjoy.google wrote:
> Do we still need the `IsAvailableOnEntry`?
I'm not quite sure.
For the value dominance, it should be safe. Can we have problems with SCEV reaching this loop from another loop nest?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73181/new/

https://reviews.llvm.org/D73181





More information about the llvm-commits mailing list