]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add relation to unsigned right shift.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 12 Jan 2022 18:28:55 +0000 (13:28 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 13 Jan 2022 18:51:30 +0000 (13:51 -0500)
commit27e4260166950b784fe270ba4f0cae9a66faf1c4
tree837cf00a12e99bfb6ab81257c72301706f242f04
parent0b8464365b15ac108cd1d00d5bc56d229c1340de
Add relation to unsigned right shift.

If the first operand and the shift value of a right shift operation are both
>= 0, then we know the LHS of the operation is <= the first operand.

PR tree-optimization/96707
gcc/
* range-op.cc (operator_rshift::lhs_op1_relation): New.

gcc/testsuite/
* g++.dg/pr96707.C: New.
gcc/range-op.cc
gcc/testsuite/g++.dg/pr96707.C [new file with mode: 0644]