[PATCH] D86576: [IR] Add NoUndef attribute to Intrinsics.td
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 11:43:57 PDT 2020
aqjune added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:1357
+ [IntrArgMemOnly, IntrWillReturn,
+ NoUndef<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
----------------
efriedma wrote:
> Do masked load/store/gather/scatter have the same problem as memcpy/memmove? In particular, it seems a bit weird that a masked store with an all-false mask has undefined behavior if the pointer argument is undef.
In case of masked store/load, I followed Memory sanitizer's behavior.
MemorySanitizerVisitor's handleMaskedStore and handleMaskedLoad calls insertShadowCheck for the pointer, which checks whether the pointer is undefined IIUC.
The same thing happens for normal load/stores, but not for memcpy/memset.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86576/new/
https://reviews.llvm.org/D86576
More information about the llvm-commits
mailing list