[PATCH] D155406: [MemCpyOpt] implement multi BB stack-move optimization

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 00:21:44 PDT 2023


khei4 marked 3 inline comments as done.
khei4 added a comment.

Thanks!



================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1434-1437
+    if (isa<BasicBlock *>(I1))
+      return I1;
+    if (isa<BasicBlock *>(I2))
+      return I2;
----------------
nikic wrote:
> I think I got these the wrong way around.
> 
> If `I1` is the start of the block, then `I2` is either also the start of the block or comes later in it, so it post-dominates.
Ah, thanks! This part only seems wrong(normal dominator rather than post). I added the test to check this, also.


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

https://reviews.llvm.org/D155406



More information about the llvm-commits mailing list