[PATCH] D96979: [DSE] Extending IsGuaranteedLoopInvariant to support a GetElementPtrInst defined in the entry block

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 11:34:28 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1922
     if (auto *GEP = dyn_cast<GEPOperator>(Ptr)) {
+      if (IsEntryBlockGEP(GEP))
+        return true;
----------------
this is not really GEP specific right? Any instruction in the entry block should be loop invariant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96979



More information about the llvm-commits mailing list