[PATCH] D139096: [DSE] Use precise loc for memset_chk during overwrite checks.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 09:57:04 PST 2022


asbirlea accepted this revision.
asbirlea added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:885
       LibFunc F;
-      if (TLI.getLibFunc(*CB, F) && TLI.has(F) && F == LibFunc_memset_chk) {
+      if (TLI.getLibFunc(*CB, F) && TLI.has(F)) {
         // Use the precise location size specified by the 3rd argument during
----------------
nit: will this be further extended to need the switch? or include in the `if` `( ...  &&  (F == LibFunc_memset_chk || F == LibFunc_memcpy_chk))`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139096



More information about the llvm-commits mailing list