[PATCH] D147260: [Loads] Support SCEVAddExpr as start for pointer AddRec.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 2 01:26:25 PDT 2023


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

LGTM



================
Comment at: llvm/lib/Analysis/Loads.cpp:308
+  if (auto *StartS = dyn_cast<SCEVUnknown>(AddRec->getStart())) {
+    assert(SE.isLoopInvariant(StartS, L) && "implied by addrec definition");
+    Base = StartS->getValue();
----------------
Move assertion out of if/else? This always holds.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147260



More information about the llvm-commits mailing list