@@ -10075,7 +10075,7 @@ Arguments:
10075
10075
The first two operands of a '``shufflevector``' instruction are vectors
10076
10076
with the same type. The third argument is a shuffle mask vector constant
10077
10077
whose element type is ``i32``. The mask vector elements must be constant
10078
- integers or ``undef `` values. The result of the instruction is a vector
10078
+ integers or ``poison `` values. The result of the instruction is a vector
10079
10079
whose length is the same as the shuffle mask and whose element type is the
10080
10080
same as the element type of the first two operands.
10081
10081
@@ -10088,15 +10088,15 @@ shuffle mask selects an element from one of the input vectors to copy
10088
10088
to the result. Non-negative elements in the mask represent an index
10089
10089
into the concatenated pair of input vectors.
10090
10090
10091
- If the shuffle mask is undefined, the result vector is undefined. If
10092
- the shuffle mask selects an undefined element from one of the input
10093
- vectors, the resulting element is undefined. An undefined element
10094
- in the mask vector specifies that the resulting element is undefined .
10095
- An undefined element in the mask vector prevents a poisoned vector
10096
- element from propagating .
10091
+ A ``poison`` element in the mask vector specifies that the resulting element
10092
+ is ``poison``.
10093
+ For backwards-compatibility reasons, LLVM temporarily also accepts ``undef``
10094
+ mask elements, which will be interpreted the same way as ``poison`` elements .
10095
+ If the shuffle mask selects an ``undef`` element from one of the input
10096
+ vectors, the resulting element is ``undef`` .
10097
10097
10098
10098
For scalable vectors, the only valid mask values at present are
10099
- ``zeroinitializer`` and ``undef ``, since we cannot write all indices as
10099
+ ``zeroinitializer``, ``undef`` and ``poison ``, since we cannot write all indices as
10100
10100
literals for a vector with a length unknown at compile time.
10101
10101
10102
10102
Example:
@@ -10106,9 +10106,9 @@ Example:
10106
10106
10107
10107
<result> = shufflevector <4 x i32> %v1, <4 x i32> %v2,
10108
10108
<4 x i32> <i32 0, i32 4, i32 1, i32 5> ; yields <4 x i32>
10109
- <result> = shufflevector <4 x i32> %v1, <4 x i32> undef ,
10109
+ <result> = shufflevector <4 x i32> %v1, <4 x i32> poison ,
10110
10110
<4 x i32> <i32 0, i32 1, i32 2, i32 3> ; yields <4 x i32> - Identity shuffle.
10111
- <result> = shufflevector <8 x i32> %v1, <8 x i32> undef ,
10111
+ <result> = shufflevector <8 x i32> %v1, <8 x i32> poison ,
10112
10112
<4 x i32> <i32 0, i32 1, i32 2, i32 3> ; yields <4 x i32>
10113
10113
<result> = shufflevector <4 x i32> %v1, <4 x i32> %v2,
10114
10114
<8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7 > ; yields <8 x i32>
0 commit comments