https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114108
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tejas Belagod <bela...@gcc.gnu.org>: https://gcc.gnu.org/g:81f3d963e05de8b17d4ccc7667ead9ed156193a4 commit r14-9487-g81f3d963e05de8b17d4ccc7667ead9ed156193a4 Author: Tejas Belagod <tejas.bela...@arm.com> Date: Wed Mar 6 15:30:26 2024 +0530 vect: Call vect_convert_output with the right vecitype [PR114108] This patch fixes a bug where vect_recog_abd_pattern called vect_convert_output with the incorrect vecitype for the corresponding pattern_stmt. vect_convert_output expects vecitype to be the vector form of the scalar type of the LHS of pattern_stmt, but we were passing in the vector form of the LHS of the new impending conversion statement. This caused a skew in ABD's pattern_stmt having the vectype of the following gimple pattern_stmt. 2024-03-06 Tejas Belagod <tejas.bela...@arm.com> gcc/ChangeLog: PR middle-end/114108 * tree-vect-patterns.cc (vect_recog_abd_pattern): Call vect_convert_output with the correct vecitype. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr114108.c: New test.