https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116083
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:66240bfc1cc9c1f1b5a9d0ebf92be70a9ab1be5c commit r15-2315-g66240bfc1cc9c1f1b5a9d0ebf92be70a9ab1be5c Author: Richard Biener <rguent...@suse.de> Date: Thu Jul 25 13:39:49 2024 +0200 tree-optimization/116083 - improve behavior when SLP discovery limit is reached The following avoids some useless work when the SLP discovery limit is reached, for example allocating a node to cache the failure and starting discovery on split store groups when analyzing BBs. It does not address the issue in the PR which is a gratious budget for discovery when the store group size approaches the number of overall statements. PR tree-optimization/116083 * tree-vect-slp.cc (vect_build_slp_tree): Do not allocate a discovery fail node when we reached the discovery limit. (vect_build_slp_instance): Terminate early when the discovery limit is reached.