From: Richard Biener Date: Wed, 30 Jul 2025 13:38:03 +0000 (+0200) Subject: Enable gather/scatter for epilogues of vector epilogues X-Git-Tag: basepoints/gcc-17~5509 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bf102afed70d88d757d6f7b3014523e66ab42ff;p=thirdparty%2Fgcc.git Enable gather/scatter for epilogues of vector epilogues The restriction no longer applies, so remove it. * tree-vect-data-refs.cc (vect_check_gather_scatter): Remove restriction on epilogue of epilogue vectorization. --- diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index 4cfd1a301c2..f9bf6a21697 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -4597,13 +4597,6 @@ vect_check_gather_scatter (stmt_vec_info stmt_info, loop_vec_info loop_vinfo, masked_p = (ifn == IFN_MASK_LOAD || ifn == IFN_MASK_STORE); } - /* ??? For epilogues we adjust DR_REF to make the following stmt-based - analysis work, but this adjustment doesn't work for epilogues of - epilogues during transform, so disable gather/scatter in that case. */ - if (LOOP_VINFO_EPILOGUE_P (loop_vinfo) - && LOOP_VINFO_EPILOGUE_P (LOOP_VINFO_ORIG_LOOP_INFO (loop_vinfo))) - return false; - /* True if we should aim to use internal functions rather than built-in functions. */ bool use_ifn_p = (DR_IS_READ (dr)