[LangRef] Memset/memcpy/memmove can take undef/poison pointer if the size is 0
authorJuneyoung Lee <aqjune@gmail.com>
Wed, 26 Aug 2020 13:06:36 +0000 (22:06 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Wed, 26 Aug 2020 21:19:28 +0000 (06:19 +0900)
commit24dd04116db34e97271a520b6ab2397c67c627cb
tree9407990cab59960784d87892ea2a649acfa7f515
parent5fbfe2ec4f8baf6a4729f9dc2e4fe16f269921eb
[LangRef] Memset/memcpy/memmove can take undef/poison pointer if the size is 0

According to the current LangRef, Memset/memcpy/memmove can take a
null/dangling pointer if the size is zero.
(Relevant thread: http://lists.llvm.org/pipermail/llvm-dev/2017-July/115665.html )
This patch expands it and allows the functions to take undef/poison pointers
too.

This required the updates in the align attribute since it isn't specified
what is the alignment of undef/poison pointers.
This patch states that their alignment is 1.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86643
llvm/docs/LangRef.rst