https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97081
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:86b25a1a5e1956c30fe7eaee80ebf719b759d631 commit r9-9089-g86b25a1a5e1956c30fe7eaee80ebf719b759d631 Author: Richard Biener <rguent...@suse.de> Date: Fri Sep 18 13:36:24 2020 +0200 tree-optimization/97081 - fix wrong-code with vectorized shift This corrects the mask for creation of x << s | x >> (-x & mask) from a rotate x <<r s to use the precision of x. 2020-09-18 Richard Biener <rguent...@suse.de> PR tree-optimization/97081 * tree-vect-patterns.c (vect_recog_rotate_pattern): Use the precision of the shifted operand to determine the mask. * gcc.dg/vect/pr97081.c: New testcase. (cherry picked from commit 9c9b88fdcff3520b2c4fb520c5d3b422eaa9a72f)