[PATCH] D86189: [LangRef] State that storing an aggregate fills padding with undef
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 22 01:17:42 PDT 2020
aqjune updated this revision to Diff 287168.
aqjune added a comment.
Update wording
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86189/new/
https://reviews.llvm.org/D86189
Files:
llvm/docs/LangRef.rst
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -9238,6 +9238,9 @@
value of a type like ``i20`` with a size that is not an integral number
of bytes, the result is undefined if the value was not originally
written using a store of the same type.
+If the value being loaded is of aggregate type, the bytes that correspond to
+padding may be accessed but is ignored, because it is impossible to observe
+padding from the loaded aggregate value.
Examples:
"""""""""
@@ -9327,6 +9330,8 @@
value of a type like ``i20`` with a size that is not an integral number
of bytes, it is unspecified what happens to the extra bits that do not
belong to the type, but they will typically be overwritten.
+If ``<value>`` is of aggregate type, padding is filled with
+:ref:`undef <undefvalues>`.
Example:
""""""""
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86189.287168.patch
Type: text/x-patch
Size: 913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200822/23b5c62f/attachment.bin>
More information about the llvm-commits
mailing list