[llvm] r334325 - [LangRef] insertelement/extractelement return poison for out of range.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 8 14:23:09 PDT 2018
Author: efriedma
Date: Fri Jun 8 14:23:09 2018
New Revision: 334325
URL: http://llvm.org/viewvc/llvm-project?rev=334325&view=rev
Log:
[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
Modified:
llvm/trunk/docs/LangRef.rst
Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=334325&r1=334324&r2=334325&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Fri Jun 8 14:23:09 2018
@@ -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:
""""""""
More information about the llvm-commits
mailing list