https://gcc.gnu.org/g:d7a53868a7fa1c57032ff1b2544311df0f5af31a
commit r17-492-gd7a53868a7fa1c57032ff1b2544311df0f5af31a Author: Richard Biener <[email protected]> Date: Wed May 13 08:47:43 2026 +0200 Record (de-)composition type in ls_type for VMAT_STRIDED_SLP accesses The following arranges the vector (de-)composition type for VMAT_STRIDED_SLP loads and stores to be available in the ls_type field of the load/store data for target costing. * tree-vect-stmts.cc (vectorizable_store): Record ls_type for VMAT_STRIDED_SLP. (vectorizable_load): Likewise. Diff: --- gcc/tree-vect-stmts.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 05b141bde1a6..da87b3297155 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -8533,6 +8533,13 @@ vectorizable_store (vec_info *vinfo, } } } + + if (costing_p) + /* Record the decomposition type for target access during costing. */ + ls.ls_type = lvectype; + else + gcc_assert (ls.ls_type == lvectype); + unsigned align; if (alignment_support_scheme == dr_aligned) align = known_alignment (DR_TARGET_ALIGNMENT (first_dr_info)); @@ -10324,6 +10331,12 @@ vectorizable_load (vec_info *vinfo, ltype = build_aligned_type (ltype, align * BITS_PER_UNIT); } + if (costing_p) + /* Record the composition type for target access during costing. */ + ls.ls_type = lvectype; + else + gcc_assert (ls.ls_type == lvectype); + /* For SLP permutation support we need to load the whole group, not only the number of vector stmts the permutation result fits in. */
