[all-commits] [llvm/llvm-project] 24dd04: [LangRef] Memset/memcpy/memmove can take undef/poi...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Wed Aug 26 14:19:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 24dd04116db34e97271a520b6ab2397c67c627cb
      https://github.com/llvm/llvm-project/commit/24dd04116db34e97271a520b6ab2397c67c627cb
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  [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




More information about the All-commits mailing list