aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-10-09 11:47:08 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-10-09 14:37:26 +0200
commit55dbb4b5261d3b0d9fb970ffd3c371bd691badea (patch)
tree2e075f59104a005d6f2a91ee0127c9646596dc21 /gcc
parent72c83f644dea755b4eba427aabde45f5d3694d9b (diff)
downloadgcc-55dbb4b5261d3b0d9fb970ffd3c371bd691badea.zip
gcc-55dbb4b5261d3b0d9fb970ffd3c371bd691badea.tar.gz
gcc-55dbb4b5261d3b0d9fb970ffd3c371bd691badea.tar.bz2
Clear DR_GROUP_NEXT_ELEMENT upon group dissolving
I've tried to sanitize DR_GROUP_NEXT_ELEMENT accesses but there are too many so the following instead makes sure DR_GROUP_NEXT_ELEMENT is never non-NULL for !STMT_VINFO_GROUPED_ACCESS. * tree-vect-data-refs.cc (vect_analyze_data_ref_access): When cancelling a DR group also clear DR_GROUP_NEXT_ELEMENT.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-vect-data-refs.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 920e3c1..202af7a 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -3206,6 +3206,7 @@ vect_analyze_data_ref_access (vec_info *vinfo, dr_vec_info *dr_info)
if (loop_vinfo && integer_zerop (step))
{
DR_GROUP_FIRST_ELEMENT (stmt_info) = NULL;
+ DR_GROUP_NEXT_ELEMENT (stmt_info) = NULL;
if (!nested_in_vect_loop_p (loop, stmt_info))
return DR_IS_READ (dr);
/* Allow references with zero step for outer loops marked
@@ -3225,6 +3226,7 @@ vect_analyze_data_ref_access (vec_info *vinfo, dr_vec_info *dr_info)
/* Interleaved accesses are not yet supported within outer-loop
vectorization for references in the inner-loop. */
DR_GROUP_FIRST_ELEMENT (stmt_info) = NULL;
+ DR_GROUP_NEXT_ELEMENT (stmt_info) = NULL;
/* For the rest of the analysis we use the outer-loop step. */
step = STMT_VINFO_DR_STEP (stmt_info);
@@ -3247,6 +3249,7 @@ vect_analyze_data_ref_access (vec_info *vinfo, dr_vec_info *dr_info)
{
/* Mark that it is not interleaving. */
DR_GROUP_FIRST_ELEMENT (stmt_info) = NULL;
+ DR_GROUP_NEXT_ELEMENT (stmt_info) = NULL;
return true;
}
}