[PATCH] D103009: [DSE] Eliminate memset after malloc

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 23:03:02 PDT 2021


xbolva00 added a comment.

And remove transformation from instcombine?



================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1810
+                                          Malloc->getArgOperand(0),
+                                          Malloc->getAttributes(), IRB, TLI)) {
+              Malloc->replaceAllUsesWith(Calloc);
----------------
We should not copy attributes from malloc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103009



More information about the llvm-commits mailing list