[PATCH] D137707: Move "auto-init" instructions to the dominator of their users

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 14:30:43 PST 2023


serge-sans-paille added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/MoveAutoInit.cpp:72
+      }
+    } else if (auto *M = dyn_cast<MemoryPhi>(MA)) {
+      for (unsigned i = 0, n = M->getNumIncomingValues(); i != n; ++i)
----------------
efriedma wrote:
> I'm not sure I understand the PHI handling here... the incoming values of a PHI are essentially original store itself, and other stores that store to the same location.  I'm not sure how analyzing the other stores helps here.  You want the store to dominate the incoming edge of the PHI, not the other stores.
> 
Indeed, I had it the other way around. Fixed in latest revision of the patch.


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

https://reviews.llvm.org/D137707



More information about the llvm-commits mailing list