[PATCH] D117095: [BasicAA] Add support for memmove intrinsic
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 01:49:37 PST 2022
fhahn added inline comments.
================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1016
// no-alias or must-alias.
- if (auto *Inst = dyn_cast<AnyMemCpyInst>(Call)) {
+ if (auto *Inst = dyn_cast<AnyMemTransferInst>(Call)) {
AliasResult SrcAA =
----------------
Is this correct?
LangRef says the following for memmove. Note that the inputs may overlap, which is different to what the requirement stated in the comment.
```
The ‘llvm.memmove.*’ intrinsics copy a block of memory from the source location to the destination location, which may overlap. It copies “len” bytes of memory over. If the argument is known to be aligned to some boundary, this can be specified as an attribute on the argument.
If <len> is 0, it is no-op modulo the behavior of attributes attached to the arguments. If <len> is not a well-defined value, the behavior is undefined. If <len> is not zero, both <dest> and <src> should be well-defined, otherwise the behavior is undefined.
```
https://llvm.org/docs/LangRef.html#id505
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117095/new/
https://reviews.llvm.org/D117095
More information about the llvm-commits
mailing list