aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-07-05 08:53:01 +0200
committerRichard Biener <rguenther@suse.de>2023-07-05 09:44:24 +0200
commit9fed1ec67f83f3c56c030fe2a501b01ceb6e243f (patch)
treef6f0496a6c5dff055344397f873387139b27c2b4
parent2d11c99dfca3cc603dbbfafb3afc41689a68e40f (diff)
downloadgcc-9fed1ec67f83f3c56c030fe2a501b01ceb6e243f.zip
gcc-9fed1ec67f83f3c56c030fe2a501b01ceb6e243f.tar.gz
gcc-9fed1ec67f83f3c56c030fe2a501b01ceb6e243f.tar.bz2
middle-end/110541 - VEC_PERM_EXPR documentation is off
The following adjusts the tree.def documentation about VEC_PERM_EXPR which wasn't adjusted when the restrictions of permutes with constant mask were relaxed. PR middle-end/110541 * tree.def (VEC_PERM_EXPR): Adjust documentation to reflect reality.
-rw-r--r--gcc/tree.def17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index 1fc2ca7..be94b7e 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -565,13 +565,18 @@ DEFTREECODE (VEC_COND_EXPR, "vec_cond_expr", tcc_expression, 3)
N = length(mask)
foreach i in N:
- M = mask[i] % (2*N)
- A = M < N ? v0[M] : v1[M-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. 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.
+ 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 as 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.
*/
DEFTREECODE (VEC_PERM_EXPR, "vec_perm_expr", tcc_expression, 3)