[PATCH] D86576: [IR] Add NoUndef attribute to Intrinsics.td
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 12:15:53 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:1357
+ [IntrArgMemOnly, IntrWillReturn,
+ NoUndef<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
----------------
aqjune wrote:
> 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.
I suspect msan's behavior isn't what we want; a completely masked load/store is sort of an edge case, though.
I'm more concerned about gather/scatter; it's much more likely we'll end up with undef vector lanes there.
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