https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100672
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:8d51039cb7c807ed84ff7df5416a1e3ba07a5e63 commit r12-913-g8d51039cb7c807ed84ff7df5416a1e3ba07a5e63 Author: Richard Biener <rguent...@suse.de> Date: Wed May 19 13:35:07 2021 +0200 middle-end/100672 - fix bogus right shift folding This fixes the bogus use of TYPE_PRECISION on vector types from optimizing -((int)x >> 31) into (unsigned)x >> 31. 2021-05-19 Richard Biener <rguent...@suse.de> PR middle-end/100672 * fold-const.c (fold_negate_expr_1): Use element_precision. (negate_expr_p): Likewise. * gcc.dg/torture/pr100672.c: New testcase.