[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
Thu Aug 20 01:10:17 PDT 2020
aqjune updated this revision to Diff 286732.
aqjune added a comment.
Mention that load ignores padding of aggregate.
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 is not read, 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.286732.patch
Type: text/x-patch
Size: 894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200820/93f7bb65/attachment.bin>
More information about the llvm-commits
mailing list