aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index 44c4ee8..3e59819 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -497,18 +497,19 @@ DEFTREECODE (COND_EXPR, "cond_expr", tcc_expression, 3)
*/
DEFTREECODE (VEC_COND_EXPR, "vec_cond_expr", tcc_expression, 3)
-/* Vector shuffle expression. A = VEC_SHUFFLE_EXPR<v0, v1, mask>
- means
+/* Vector permutation expression. A = VEC_PERM_EXPR<v0, v1, mask> means
- foreach i in length (mask):
- A = mask[i] < length (v0) ? v0[mask[i]] : v1[mask[i] - length (mask)]
+ N = length(mask)
+ foreach i in N:
+ M = mask[i] % (2*N)
+ A = M < N ? v0[M] : v1[M-N]
V0 and V1 are vectors of the same type. MASK is an integer-typed
vector. The number of MASK elements must be the same with the
number of elements in V0 and V1. The size of the inner type
of the MASK and of the V0 and V1 must be the same.
*/
-DEFTREECODE (VEC_SHUFFLE_EXPR, "vec_shuffle_expr", tcc_expression, 3)
+DEFTREECODE (VEC_PERM_EXPR, "vec_perm_expr", tcc_expression, 3)
/* Declare local variables, including making RTL and allocating space.
BIND_EXPR_VARS is a chain of VAR_DECL nodes for the variables.