[PATCH] D150970: [MemCpyOpt]remove memcpy on immutable arguments from attributes

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 21:37:34 PDT 2023


khei4 added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1678
+  if ((!MemDepAlign || *MemDepAlign < AllocaAlign) &&
+      getOrEnforceKnownAlignment(MDep->getSource(), MaybeAlign(AllocaAlign), DL,
+                                 &CB, AC, DT) < AllocaAlign)
----------------
nikic wrote:
> Is the explicit `MaybeAlign()` here needed?
That was just to adjust arg types to the off-the-shelf util functions! Although it was wrong and removed! 


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

https://reviews.llvm.org/D150970



More information about the llvm-commits mailing list