diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-01-14 22:24:37 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-01-15 13:35:52 +0000 |
commit | 711421af001b8f4f044f485c78f1d07ed5201656 (patch) | |
tree | 271bfca9486b6342280c64fc2722995777fff410 /gcc/tree-vect-loop.c | |
parent | 86c3a7d891f9f175d09d61f5ce163c6dc5ce681f (diff) | |
download | gcc-711421af001b8f4f044f485c78f1d07ed5201656.zip gcc-711421af001b8f4f044f485c78f1d07ed5201656.tar.gz gcc-711421af001b8f4f044f485c78f1d07ed5201656.tar.bz2 |
PR tree-optimization/93247 - ICE in get_load_store_type
My earlier update_epilogue_loop_vinfo patch introduced an ICE on these
tests for AVX512. If we use pattern stmts, STMT_VINFO_GATHER_SCATTER_P
is valid for both the original stmt and the pattern stmt, but
STMT_VINFO_MEMORY_ACCESS_TYPE is valid only for the latter.
2020-01-15 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/93247
* tree-vect-loop.c (update_epilogue_loop_vinfo): Check the access
type of the stmt that we're going to vectorize.
gcc/testsuite/
PR tree-optimization/93247
* gcc.dg/vect/pr93247-1.c: New test.
* gcc.dg/vect/pr93247-2.c: Likewise.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index faf8161..8e318a0 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8452,7 +8452,8 @@ 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_MEMORY_ACCESS_TYPE (stmt_vinfo) == VMAT_GATHER_SCATTER) + if (STMT_VINFO_MEMORY_ACCESS_TYPE (vect_stmt_to_vectorize (stmt_vinfo)) + == VMAT_GATHER_SCATTER) { DR_REF (dr) = simplify_replace_tree (DR_REF (dr), NULL_TREE, NULL_TREE, |