[PATCH] D86725: [MemLoc] Support memcmp in MemoryLocation::getForArgument.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 13:42:38 PDT 2020
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Analysis/MemoryLocation.cpp:213
LibFunc F;
- 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);
+ if (TLI && Call->getCalledFunction() && TLI->getLibFunc(*Call, F) &&
+ TLI->has(F)) {
----------------
`Call->getCalledFunction()` is redundant.
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