https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110541
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed| |2023-07-05 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The restriction as documented in tree.def applies to non-constant MASKs only, the case for constant MASKs was relaxed. Like /* Vector permutation expression. A = VEC_PERM_EXPR<v0, v1, mask> means N = length(mask) foreach i in N: M = mask[i] % (length(v0) + length(v1)) A[i] = M < length(v0) ? v0[M] : v1[M - length(v0)] V0 and V1 are vectors of the same type. When MASK is not constant: 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. When MASK is constant: MASK is an integer-typed vector. MASK elements outside of [0, length(V0) + length(V1) - 1] invoke undefined behavior (the modulo operation above doesn't apply). */ DEFTREECODE (VEC_PERM_EXPR, "vec_perm_expr", tcc_expression, 3) I will submit this change.