https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113018
--- 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:4e9b2c94e45f5991a472fb639fb2baa6aa42b76b commit r14-6552-g4e9b2c94e45f5991a472fb639fb2baa6aa42b76b Author: Richard Biener <rguent...@suse.de> Date: Thu Dec 14 16:00:50 2023 +0100 tree-optimization/113018 - ICE with BB reduction vectorization When BB reduction vectorization picks up a chain with an ASM def in it and that's inside the vectorized region we fail to get its LHS. Instead of trying to get the correct def the following avoids vectorizing such def and instead keeps it as def to add in the epilog. PR tree-optimization/113018 * tree-vect-slp.cc (vect_slp_check_for_roots): Only start SLP discovery from stmts with a LHS.