https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127670
--- 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:58b657a872ae7bc9815a9c60398cd3bec0626b81 commit r17-4782-g58b657a872ae7bc9815a9c60398cd3bec0626b81 Author: Richard Biener <[email protected]> Date: Wed Sep 30 11:03:28 2026 +0200 tree-optimization/127670 - vectorizable_shift and live stmts vectorizable_shift inspects scalar stmts to decide whether to use a shift by scalar. This is fragile and not optimal. For the testcase the shift argument is live and since only part of the SLP node is part of the computed scalar coverage not all scalar shift arguments are replaced during code generation. As we re-analyze we get into conflicting results and ICE. The following does a first step towards fixing up vectorizable_shift by computing uniformity of the shift argument from the SLP node for the shift argument, using its scalar defs (which are never replaced). PR tree-optimization/127670 * tree-vect-stmts.cc (vectorizable_shift): Analyze defs of the shift operand SLP node instead of the scalar stmt operands for uniformity. * gcc.dg/vect/bb-slp-pr127670.c: New testcase.
