https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102738
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>: https://gcc.gnu.org/g:f0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0 commit r12-4413-gf0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0 Author: Andrew MacLeod <amacl...@redhat.com> Date: Thu Oct 14 10:43:58 2021 -0400 Simplification for right shift. When the first operand of a signed right shift is zero or negative one, the RHS doesn't matter and the shift can be converted to a copy. PR tree-optimization/102738 gcc/ * vr-values.c (simplify_using_ranges::simplify): Handle RSHIFT_EXPR. gcc/testsuite * gcc.dg/pr102738.c: New.