[gcc r17-2588] docs: Document that scatters are left-to-right.
Robin Dapp via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:066b2291bcafe507f8576d01518028532fce954f commit r17-2588-g066b2291bcafe507f8576d01518028532fce954f Author: Robin Dapp <[email protected]> Date: Tue Jul 21 10:37:46 2026 +0200 docs: Document that scatters are left-to-right. This changes the docs to reflect the vectorizer's assumption that scatter stores are ordered. Both, scatters and strided stores are affected. gcc/ChangeLog: * doc/md.texi: Document that scatters are left-to-right. Diff: --- gcc/doc/md.texi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index a98a572cc017..67c036d6bcb3 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -7439,11 +7439,11 @@ Mask elements @var{i} with @var{i} > (operand 4 + operand 5) are ignored. @mdindex scatter_store@var{m}@var{n} @item @samp{scatter_store@var{m}@var{n}} -Store a vector of mode @var{m} into several distinct memory locations. -Operand 0 is a scalar base address and operand 1 is a vector of mode -@var{n} containing offsets from that base. Operand 4 is the vector of -values that should be stored, which has the same number of elements as -@var{n}. For each element index @var{i}: +Store a vector of mode @var{m} into several, not necessarily distinct, +memory locations. Operand 0 is a scalar base address and operand 1 is +a vector of mode @var{n} containing offsets from that base. Operand 4 +is the vector of values that should be stored, which has the same number +of elements as @var{n}. For each element index @var{i}: @itemize @bullet @item @@ -7460,6 +7460,10 @@ store element @var{i} of operand 4 to that address. The value of operand 2 does not matter if the offsets are already address width. +If two or more offset elements point to the same location, it is expected that +the one with the highest element index is being written last. This implies a +left-to-right ordering of the store. + @mdindex mask_scatter_store@var{m}@var{n} @item @samp{mask_scatter_store@var{m}@var{n}} Like @samp{scatter_store@var{m}@var{n}}, but takes an extra mask operand as @@ -7476,7 +7480,7 @@ Mask elements @var{i} with @var{i} > (operand 6 + operand 7) are ignored. @mdindex mask_len_strided_store@var{m} @item @samp{mask_len_strided_store@var{m}} -Store a vector of mode m into several distinct memory locations. +Store a vector of mode m into several, not necessarily distinct, memory locations. Operand 0 is a scalar base address and operand 1 is scalar stride of Pmode. Operand 2 is the vector of values that should be stored, which is of mode @var{m}. operand 3 is mask operand, operand 4 is length operand and operand 5 is bias operand.