aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-08-25 09:42:16 +0200
committerRichard Biener <rguenther@suse.de>2023-08-25 10:17:53 +0200
commita739bac402ea5a583e43dbd01c14ebaff317c885 (patch)
tree66fd7525e5a964b82a7ee27f830dc2d5710237e3 /gcc
parent449ab115dece8ac8e8f27d2d7b5bc653a2c75d3a (diff)
downloadgcc-a739bac402ea5a583e43dbd01c14ebaff317c885.zip
gcc-a739bac402ea5a583e43dbd01c14ebaff317c885.tar.gz
gcc-a739bac402ea5a583e43dbd01c14ebaff317c885.tar.bz2
tree-optimization/111136 - STMT_VINFO_SLP_VECT_ONLY and stores
vect_dissolve_slp_only_groups currently only expects loads, for stores we have to make sure to mark the dissolved "groups" strided. 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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-vect-loop.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index ebee803..23c6e82 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -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