[PATCH] D98284: [DSE] Handle memcpy/memset with equal non-const sizes.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 06:37:20 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:393
+      const Value *P2 = Later.Ptr->stripPointerCasts();
+      if (P1 == P2 || AA.isMustAlias(P1, P2))
+        return OW_Complete;
----------------
nikic wrote:
> I'd directly call `AA.isMustAlias(Ealier, Later)` here and forego the manual pointer cast stripping.
Good point, I initially kept it symmetric with the code below, but it's not really needed. I adjusted that in the committed version


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98284



More information about the llvm-commits mailing list