[PATCH] D115965: [DSE] Fix a case of invalid dead store elimination

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 23 08:13:37 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1215
+      if (auto *I = dyn_cast<Instruction>(Ptr))
+        return I->getParent()->isEntryBlock();
       return true;
----------------
mamai wrote:
> nikic wrote:
> > The code structure in this function no longer makes sense. Please rewrite the whole function to first strip offsets / GEP and then do a single entry block check.
> Sorry, I just saw your comment after comiting. I could change it, but should I open a new differential for that ?
It's probably easiest to just put up a new review with the requested changes


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115965



More information about the llvm-commits mailing list