https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108738
--- Comment #5 from CVS 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:ec23e9e25eb64bb066dc408fd498861b8587bec8 commit r13-5994-gec23e9e25eb64bb066dc408fd498861b8587bec8 Author: Richard Biener <rguent...@suse.de> Date: Thu Feb 9 11:03:25 2023 +0100 target/108738 - STV bitmap operations compile-time hog When the set of candidates becomes very large then repeated bit checks on it during the build of an actual chain can become slow because of the O(n) nature of bitmap tests. The following switches the candidates bitmaps to the tree representation before building the chains to get O(log n) amortized behavior. For the testcase at hand this improves STV time by 50%. PR target/108738 * config/i386/i386-features.cc (convert_scalars_to_vector): Switch candidates bitmaps to tree view before building the chains.