mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58964 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2932,23 +2932,25 @@ exceeds the length of <tt>val</tt>, the results are undefined.
|
||||
<h5>Syntax:</h5>
|
||||
|
||||
<pre>
|
||||
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <n x i32> <mask> <i>; yields <n x <ty>></i>
|
||||
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> <i>; yields <m x <ty>></i>
|
||||
</pre>
|
||||
|
||||
<h5>Overview:</h5>
|
||||
|
||||
<p>
|
||||
The '<tt>shufflevector</tt>' instruction constructs a permutation of elements
|
||||
from two input vectors, returning a vector of the same type.
|
||||
from two input vectors, returning a vector with the same element type as
|
||||
the input and length that is the same as the shuffle mask.
|
||||
</p>
|
||||
|
||||
<h5>Arguments:</h5>
|
||||
|
||||
<p>
|
||||
The first two operands of a '<tt>shufflevector</tt>' instruction are vectors
|
||||
with types that match each other and types that match the result of the
|
||||
instruction. The third argument is a shuffle mask, which has the same number
|
||||
of elements as the other vector type, but whose element type is always 'i32'.
|
||||
The first two operands of a '<tt>shufflevector</tt>' instruction are vectors
|
||||
with types that match each other. The third argument is a shuffle mask whose
|
||||
element type is always 'i32'. The result of the instruction is a vector whose
|
||||
length is the same as the shuffle mask and whose element type is the same as
|
||||
the element type of the first two operands.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -2961,7 +2963,7 @@ constant integer or undef values.
|
||||
<p>
|
||||
The elements of the two input vectors are numbered from left to right across
|
||||
both of the vectors. The shuffle mask operand specifies, for each element of
|
||||
the result vector, which element of the two input registers the result element
|
||||
the result vector, which element of the two input vectors the result element
|
||||
gets. The element selector may be undef (meaning "don't care") and the second
|
||||
operand may be undef if performing a shuffle from only one vector.
|
||||
</p>
|
||||
@@ -2973,6 +2975,10 @@ operand may be undef if performing a shuffle from only one vector.
|
||||
<4 x i32> <i32 0, i32 4, i32 1, i32 5> <i>; yields <4 x i32></i>
|
||||
%result = shufflevector <4 x i32> %v1, <4 x i32> undef,
|
||||
<4 x i32> <i32 0, i32 1, i32 2, i32 3> <i>; yields <4 x i32></i> - Identity shuffle.
|
||||
%result = shufflevector <8 x i32> %v1, <8 x i32> undef,
|
||||
<4 x i32> <i32 0, i32 1, i32 2, i32 3> <i>; yields <4 x i32></i>
|
||||
%result = shufflevector <4 x i32> %v1, <4 x i32> %v2,
|
||||
<8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7 > <i>; yields <8 x i32></i>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user