diff options
author | Richard Biener <rguenther@suse.de> | 2024-06-10 15:31:35 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-06-13 08:20:58 +0200 |
commit | e8f4d525cb320ff11dd95b985d8043fef0510878 (patch) | |
tree | 113cae310acc34983bf2f98c8bea1a3c47a1acc0 /gcc/explow.cc | |
parent | 6669dc51515313dd1e60c493596dbc90429fc362 (diff) | |
download | gcc-e8f4d525cb320ff11dd95b985d8043fef0510878.zip gcc-e8f4d525cb320ff11dd95b985d8043fef0510878.tar.gz gcc-e8f4d525cb320ff11dd95b985d8043fef0510878.tar.bz2 |
Improve code generation of strided SLP loads
This avoids falling back to elementwise accesses for strided SLP
loads when the group size is not a multiple of the vector element
size. Instead we can use a smaller vector or integer type for the load.
For stores we can do the same though restrictions on stores we handle
and the fact that store-merging covers up makes this mostly effective
for cost modeling which shows for gcc.target/i386/vect-strided-3.c
which we now vectorize with V4SI vectors rather than just V2SI ones.
For all of this there's still the opportunity to use non-uniform
accesses, say for a 6-element group with a VF of two do
V4SI, { V2SI, V2SI }, V4SI. But that's for a possible followup.
* tree-vect-stmts.cc (get_group_load_store_type): Consistently
use VMAT_STRIDED_SLP for strided SLP accesses and not
VMAT_ELEMENTWISE.
(vectorizable_store): Adjust VMAT_STRIDED_SLP handling to
allow not only half-size but also smaller accesses.
(vectorizable_load): Likewise.
* gcc.target/i386/vect-strided-1.c: New testcase.
* gcc.target/i386/vect-strided-2.c: Likewise.
* gcc.target/i386/vect-strided-3.c: Likewise.
* gcc.target/i386/vect-strided-4.c: Likewise.
Diffstat (limited to 'gcc/explow.cc')
0 files changed, 0 insertions, 0 deletions