[PATCH] D86725: [MemLoc] Support memcmp in MemoryLocation::getForArgument.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 12:17:34 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Analysis/MemoryLocation.cpp:214
   if (TLI && Call->getCalledFunction() &&
-      TLI->getLibFunc(*Call->getCalledFunction(), F) &&
-      F == LibFunc_memset_pattern16 && TLI->has(F)) {
-    assert((ArgIdx == 0 || ArgIdx == 1) &&
-           "Invalid argument index for memset_pattern16");
-    if (ArgIdx == 1)
-      return MemoryLocation(Arg, LocationSize::precise(16), AATags);
-    if (const ConstantInt *LenCI =
-            dyn_cast<ConstantInt>(Call->getArgOperand(2)))
-      return MemoryLocation(Arg, LocationSize::precise(LenCI->getZExtValue()),
-                            AATags);
+      TLI->getLibFunc(*Call->getCalledFunction(), F) && TLI->has(F)) {
+    switch (F) {
----------------
While you're here, can we switch this to use `TLI->getLibFunc(*Call, F)`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86725



More information about the llvm-commits mailing list