tree-optimization/111136 - STMT_VINFO_SLP_VECT_ONLY and stores
Checks
Commit Message
vect_dissolve_slp_only_groups currently only expects loads, for stores
we have to make sure to mark the dissolved "groups" strided.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
PR tree-optimization/111136
* tree-vect-loop.cc (vect_dissolve_slp_only_groups): For
stores force STMT_VINFO_STRIDED_P and also duplicate that
to all elements.
---
gcc/tree-vect-loop.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
@@ -2453,8 +2453,13 @@ vect_dissolve_slp_only_groups (loop_vec_info loop_vinfo)
DR_GROUP_FIRST_ELEMENT (vinfo) = vinfo;
DR_GROUP_NEXT_ELEMENT (vinfo) = NULL;
DR_GROUP_SIZE (vinfo) = 1;
- if (STMT_VINFO_STRIDED_P (first_element))
- DR_GROUP_GAP (vinfo) = 0;
+ if (STMT_VINFO_STRIDED_P (first_element)
+ /* We cannot handle stores with gaps. */
+ || DR_IS_WRITE (dr_info->dr))
+ {
+ STMT_VINFO_STRIDED_P (vinfo) = true;
+ DR_GROUP_GAP (vinfo) = 0;
+ }
else
DR_GROUP_GAP (vinfo) = group_size - 1;
/* Duplicate and adjust alignment info, it needs to