https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125646
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:ac8d5633cc7baf76e1b22d3da68de589eadc74cf commit r16-9098-gac8d5633cc7baf76e1b22d3da68de589eadc74cf Author: Richard Biener <[email protected]> Date: Mon Jun 8 09:41:25 2026 +0200 tree-optimization/125646 - fixup vector types for const mult pattern When we pattern recognize integer multiplication with a constant and need a conversion to unsigned we fail to set the appropriate unsigned vector type on the pattern stmt so it gets the vector type of the signed result. This confuses code dealing with UB for reduction vectorization but will also result in wrong-code in the non-reduction case. PR tree-optimization/125646 * tree-vect-patterns.cc (vect_synth_mult_by_constant): Assign vector type to the pattern def sequence stmts. * gcc.dg/vect/pr125646.c: New testcase. (cherry picked from commit 87039d23cb9ab43f74da905226e1fac9b4de10bc)
