diff options
| author | Robin Dapp <rdapp@ventanamicro.com> | 2025-09-09 11:41:51 +0200 |
|---|---|---|
| committer | Robin Dapp <rdapp@ventanamicro.com> | 2025-11-07 21:09:45 +0100 |
| commit | e51fffdcbb53f10acffd197379585a586720a9b3 (patch) | |
| tree | aa07204f2bfb259188c58ebe09297280ad9fa4fa /libjava/java/security/Engine.java | |
| parent | a1de16a8e523de2ba928f7b5251059329eef0dc6 (diff) | |
| download | gcc-e51fffdcbb53f10acffd197379585a586720a9b3.zip gcc-e51fffdcbb53f10acffd197379585a586720a9b3.tar.gz gcc-e51fffdcbb53f10acffd197379585a586720a9b3.tar.bz2 | |
vect: Relax gather/scatter detection by swapping offset sign.
This patch adjusts vect_gather_scatter_fn_p to always check an offset
type with swapped signedness (vs. the original offset argument).
If the target supports the gather/scatter with the new offset type as
well as the conversion of the offset we now emit an explicit offset
conversion before the actual gather/scatter.
The relaxation is only done for the IFN path of gather/scatter and the
general idea roughly looks like:
- vect_gather_scatter_fn_p builds a list of all offset vector types
that the target supports for the current vectype. Then it goes
through that list, trying direct support first and sign-swapped
offset types next, taking precision requirements into account.
If successful it sets supported_offset_vectype to the type that actually
worked while offset_vectype_out is the type that was requested.
- vect_check_gather_scatter works as before but uses the relaxed
vect_gather_scatter_fn_p.
- get_load_store_type sets ls_data->supported_offset_vectype if the
requested type wasn't supported but another one was.
- check_load_store_for_partial_vectors uses the
supported_offset_vectype in order to validate what get_load_store_type
determined.
- vectorizable_load/store emit a conversion if
ls_data->supported_offset_vectype is nonzero and cost it.
The offset type is either of pointer size (if we started with a signed
offset) or twice the size of the original offset (when that one was
unsigned).
gcc/ChangeLog:
* tree-vect-data-refs.cc (struct gather_scatter_config): New
struct to hold gather/scatter configurations.
(vect_gather_scatter_which_ifn): New function to determine which
IFN to use.
(vect_gather_scatter_get_configs): New function to enumerate all
target-supported configs.
(vect_gather_scatter_fn_p): Rework to use
vect_gather_scatter_get_configs and try sign-swapped offset.
(vect_check_gather_scatter): Use new supported offset vectype
argument.
* 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): Convert to sign-swapped offset type if
needed.
(vectorizable_load): Ditto.
* tree-vectorizer.h (struct vect_load_store_data): Add
supported_offset_vectype.
(vect_gather_scatter_fn_p): Add argument.
Diffstat (limited to 'libjava/java/security/Engine.java')
0 files changed, 0 insertions, 0 deletions
