]> git.ipfire.org Git - thirdparty/gcc.git/commit
vect: Relax gather/scatter scale handling.
authorRobin Dapp <rdapp@ventanamicro.com>
Wed, 29 Oct 2025 15:02:51 +0000 (16:02 +0100)
committerRobin Dapp <rdapp@ventanamicro.com>
Fri, 7 Nov 2025 20:09:45 +0000 (21:09 +0100)
commit573ea59a48d95fc4e9f520865eae71c5d9de614f
tree151de219d15e7a5bfc2cf8138aefa5b613900912
parente51fffdcbb53f10acffd197379585a586720a9b3
vect: Relax gather/scatter scale handling.

Similar to the signed/unsigned patch before this one relaxes the
gather/scatter restrictions on scale factors.  The basic idea is that a
natively unsupported scale factor can still be reached by emitting a
multiplication before the actual gather operation.  As before, we need
to make sure that there is no overflow when multiplying.

gcc/ChangeLog:

* tree-vect-data-refs.cc (struct gather_scatter_config):
Add scale.
(vect_gather_scatter_get_configs): Try various scales.
(vect_gather_scatter_fn_p): Add scale handling.
(vect_check_gather_scatter): Add scale parameter.
* tree-vect-stmts.cc (check_load_store_for_partial_vectors):
Ditto.
(vect_truncate_gather_scatter_offset): Ditto.
(vect_use_grouped_gather): Ditto.
(get_load_store_type): Ditto.
(vectorizable_store): Scale offset if necessary.
(vectorizable_load): Ditto.
* tree-vectorizer.h (struct vect_load_store_data): Add
supported_scale.
(vect_gather_scatter_fn_p): Add argument.
gcc/tree-vect-data-refs.cc
gcc/tree-vect-stmts.cc
gcc/tree-vectorizer.h