diff options
| author | Eli Friedman <efriedma@codeaurora.org> | 2018-06-08 21:23:09 +0000 |
|---|---|---|
| committer | Eli Friedman <efriedma@codeaurora.org> | 2018-06-08 21:23:09 +0000 |
| commit | 2c7a81b2f8c5e65d61a06a815c48cc9e4a47f807 (patch) | |
| tree | 3bdcb4d06bec4c3a88f994da481e221e93f82b8f | |
| parent | 70783e5f355739ff7863d1bd18f5c95145b03885 (diff) | |
| download | bcm5719-llvm-2c7a81b2f8c5e65d61a06a815c48cc9e4a47f807.tar.gz bcm5719-llvm-2c7a81b2f8c5e65d61a06a815c48cc9e4a47f807.zip | |
[LangRef] insertelement/extractelement return poison for out of range.
We need to clarify the language here. I think poison makes more sense
than undef, since it's an undefined operation rather than uninitialized
memory. I don't think anything depends on the difference at the moment,
though.
Differential Revision: https://reviews.llvm.org/D47859
llvm-svn: 334325
| -rw-r--r-- | llvm/docs/LangRef.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index de3bb131e03..12490e91ecd 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -7595,7 +7595,8 @@ Semantics: The result is a scalar of the same type as the element type of ``val``. Its value is the value at position ``idx`` of ``val``. If ``idx`` -exceeds the length of ``val``, the results are undefined. +exceeds the length of ``val``, the result is a +:ref:`poison value <poisonvalues>`. Example: """""""" @@ -7636,8 +7637,8 @@ Semantics: The result is a vector of the same type as ``val``. Its element values are those of ``val`` except at position ``idx``, where it gets the value -``elt``. If ``idx`` exceeds the length of ``val``, the results are -undefined. +``elt``. If ``idx`` exceeds the length of ``val``, the result +is a :ref:`poison value <poisonvalues>`. Example: """""""" |

