On 10/19/20 4:22 PM, Jakub Jelinek wrote:
On Mon, Oct 19, 2020 at 10:19:48AM -0400, Andrew MacLeod via Gcc-patches wrote:
On 10/19/20 5:38 AM, Aldy Hernandez wrote:
If the shift amount in operator_lshift::op1_range was zero, an invalid range
of [1, 0] was being created.
Should we do the sa
On Mon, Oct 19, 2020 at 10:19:48AM -0400, Andrew MacLeod via Gcc-patches wrote:
> On 10/19/20 5:38 AM, Aldy Hernandez wrote:
> > If the shift amount in operator_lshift::op1_range was zero, an invalid range
> > of [1, 0] was being created.
>
> Should we do the same thing with rshift::op1_range? Â
On 10/19/20 5:38 AM, Aldy Hernandez wrote:
If the shift amount in operator_lshift::op1_range was zero, an invalid range
of [1, 0] was being created.
Should we do the same thing with rshift::op1_range? ie, return the
LHS if the shift is 0 instead of trying to figure it out
Pushed.
If the shift amount in operator_lshift::op1_range was zero, an invalid range
of [1, 0] was being created.
Pushed.
gcc/ChangeLog:
PR tree-optimization/97467
* range-op.cc (operator_lshift::op1_range): Handle shifts by 0.
gcc/testsuite/ChangeLog:
* gcc.dg/pr97467.c: New t