https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119640
--- Comment #5 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:a4abf0fb902816a2508dda5956f407fc27821d88 commit r15-9249-ga4abf0fb902816a2508dda5956f407fc27821d88 Author: Richard Biener <rguent...@suse.de> Date: Mon Apr 7 11:27:19 2025 +0200 tree-optimization/119640 - ICE with vectorized shift placement When the whole shift is invariant but the shift amount needs to be converted and a vector shift used we can mess up placement of vector stmts because we do not make SLP scheduling aware of the need to insert code for it. The following mitigates this by more conservative placement of such code in vectorizable_shift. PR tree-optimization/119640 * tree-vect-stmts.cc (vectorizable_shift): Always insert code for one of our SLP operands before the code for the vector shift itself. * gcc.dg/vect/pr119640.c: New testcase.