https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126998
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:600e25ecc075c82be09240255567180fc2849fb8 commit r17-3693-g600e25ecc075c82be09240255567180fc2849fb8 Author: Richard Biener <[email protected]> Date: Wed Aug 26 14:08:18 2026 +0200 Refactor vect_reduction_update_partial_vector_usage vect_reduction_update_partial_vector_usage is called from two places, both time with vectype_in as vector type but once with the reduction slp_node and once with the slp_node for the input. Where that makes a difference is in the nvectors argument that gets passed to vect_record_loop_{len,mask}. This is a bit weird and it will stand in the way of PR126998. So the following refactors this a bit, leaving the updating parts to the caller where it might be easier to reason this is (in-)correct. PR tree-optimization/126998 * tree-vect-loop.cc (vect_reduction_update_partial_vector_usage): Return a bool, defer vect_record_loop_{len,mask} to the caller. (vectorizable_lane_reducing): Adjust. (vectorizable_reduction): Likewise.
