The following removes the no longer necessary fixup to the
gather/scatter DRs from epilogue vectorization. This should
also enable epilogue of epilogue vectorization with gather/scatters.
This is made possible by remmebering and re-using the analysis results
of get_load_store_type for load/store vectorization code generation.
* tree-vect-loop.cc (update_epilogue_loop_vinfo): Remove
fixing up DRs of gather/scatters.
---
gcc/tree-vect-loop.cc | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index a07e22e620c..04c9c856232 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11284,27 +11284,6 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree
advance)
orig_stmt = DR_STMT (dr);
gcc_assert (gimple_uid (orig_stmt) > 0);
stmt_vinfo = epilogue_vinfo->stmt_vec_infos[gimple_uid (orig_stmt) - 1];
- /* Data references for gather loads and scatter stores do not use the
- 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. Make sure to update both
- gather/scatters recognized by dataref analysis and also other
- refs that get_load_store_type classified as VMAT_GATHER_SCATTER. */
- auto vstmt_vinfo = vect_stmt_to_vectorize (stmt_vinfo);
- if (STMT_VINFO_MEMORY_ACCESS_TYPE (vstmt_vinfo) == VMAT_GATHER_SCATTER
- || STMT_VINFO_STRIDED_P (vstmt_vinfo)
- || STMT_VINFO_GATHER_SCATTER_P (vstmt_vinfo))
- {
- /* ??? As we copy epilogues from the main loop incremental
- replacement from an already replaced DR_REF from vectorizing
- the first epilogue will fail. */
- DR_REF (dr)
- = simplify_replace_tree (DR_REF (dr), NULL_TREE, NULL_TREE,
- &find_in_mapping, &mapping);
- DR_BASE_ADDRESS (dr)
- = simplify_replace_tree (DR_BASE_ADDRESS (dr), NULL_TREE, NULL_TREE,
- &find_in_mapping, &mapping);
- }
DR_STMT (dr) = STMT_VINFO_STMT (stmt_vinfo);
}
--
2.43.0