summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-01-10 14:56:20 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2020-01-10 14:56:20 +0000
commitac190fcea1bebf87a2c8c3963548a0e5272c42ec (patch)
tree0652422c6b4fa21ff8ff9b88f65df7593d91e028
parent2fb672a2574004a1e77c8ba83af539673f5cf659 (diff)
downloadgcc-ac190fcea1bebf87a2c8c3963548a0e5272c42ec.tar.gz
Fix gather/scatter check when updating a vector epilogue loop
update_epilogue_loop_vinfo applies SSA renmaing to the DR_REF of a gather or scatter, so that vect_check_gather_scatter continues to work. However, we sometimes also rely on vect_check_gather_scatter when using gathers and scatters to implement strided accesses. This showed up on existing tests when testing with fixed-length -msve-vector-bits=128. 2020-01-10 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vect-loop.c (update_epilogue_loop_vinfo): Update DR_REF for any type of gather or scatter, including strided accesses. From-SVN: r280111
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-vect-loop.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f8298abebd7..28564f723e1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vect-loop.c (update_epilogue_loop_vinfo): Update DR_REF
+ for any type of gather or scatter, including strided accesses.
+
2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
* tree-vectorizer.h (get_dr_vinfo_offset): Add missing function
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 596eafc2d3f..1fa3ba6d932 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -8451,7 +8451,7 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance)
updated offset we set using ADVANCE. Instead we have to make sure the
reference in the data references point to the corresponding copy of
the original in the epilogue. */
- if (STMT_VINFO_GATHER_SCATTER_P (stmt_vinfo))
+ if (STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_vinfo) == VMAT_GATHER_SCATTER)
{
DR_REF (dr)
= simplify_replace_tree (DR_REF (dr), NULL_TREE, NULL_TREE,