https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125646
--- 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:87039d23cb9ab43f74da905226e1fac9b4de10bc commit r17-1420-g87039d23cb9ab43f74da905226e1fac9b4de10bc 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.
