On 11/11/24 5:16 AM, Richard Biener wrote:
The following enables targets to suggest the vector mode to be used preferably for the epilogue of a vectorized loop. The patch also enables more than one vectorized epilogue in case the target suggests a vector mode for the epilogue of a vector epilogue. Bootstrapped and tested on x86_64-unknown-linux-gnu. As you can see without target cost modeling you cannot get more than one vectorized epilogue (I've dropped the --param vect-epilogues-nomask=N approach for now). In case the target prefers a specific epilogue mode but that turns out to not vectorize we continue iterating, searching for an alternative mode. Any objections? Thanks, Richard. * tree-vectorizer.h (vector_costs::suggested_epilogue_mode): New. (vector_costs::m_suggested_epilogue_mode): Likewise. (vector_costs::vector_costs): Initialize m_suggested_epilogue_mode. * tree-vect-loop.cc (vect_analyze_loop): Honor the target suggested prefered epilogue mode and support vector epilogues of vector epilogues if requested.
No objection from me. jeff