diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi index 3f52d30..4e8f131 100644 --- a/gcc/doc/generic.texi +++ b/gcc/doc/generic.texi @@ -1826,6 +1826,7 @@ a value from @code{enum annot_expr_kind}, the third is an @code{INTEGER_CST}. @tindex VEC_PACK_FIX_TRUNC_EXPR @tindex VEC_PACK_FLOAT_EXPR @tindex VEC_COND_EXPR +@tindex VEC_PERM_EXPR @tindex SAD_EXPR @table @code @@ -1967,6 +1968,27 @@ any other value currently, but optimizations should not rely on that property. In contrast with a @code{COND_EXPR}, all operands are always evaluated. +@item VEC_PERM_EXPR +This node represents a vector permute/blend operation. The three operands +must be vectors of the same number of elements. The first and second +operands must be vectors of the same type as the entire expression, and +the third operand, @dfn{selector}, must be an integral vector type. + +The input elements are numbered from 0 in operand 1 through +@math{2*@var{N}-1} in operand 2. The elements of the selector are +interpreted modulo @math{2*@var{N}}. + +The expression +@code{@var{out} = VEC_PERM_EXPR<@var{v0}, @var{v1}, @var{selector}>}, +where @var{v0}, @var{v1} and @var{selector} have @var{N} elements, means +@smallexample + for (int i = 0; i < N; i++) + @{ + int j = selector[i] % (2*N); + out[i] = j < N ? v0[j] : v1[j-N]; + @} +@end smallexample + @item SAD_EXPR This node represents the Sum of Absolute Differences operation. The three operands must be vectors of integral types. The first and second operand