[Bug middle-end/100672] wrong code with vector shift and unary minus
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 9 13:05:58 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100672
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:e8311f59c6e2fa1f5aacc3da5e95739886ebdee7
commit r10-10261-ge8311f59c6e2fa1f5aacc3da5e95739886ebdee7
Author: Richard Biener <rguenther@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 <rguenther@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.
(cherry picked from commit 8d51039cb7c807ed84ff7df5416a1e3ba07a5e63)
More information about the Gcc-bugs
mailing list