This solves issue #4413. shiftadd did not consider underflows for unsigned shift-amounts.
Specifically the issue arises if peepopt receives an expression like
wire [6:0] shift;
wire [7:0] data, shift2;
assign shift2 = shift - 1'b1;
assign out = data >> shift2;
Here an intended underflow occurs if shift<1. (by intended I mean it is what the current network implies, no matter what the designer might have wanted).
This adds a filter for the case described and adds the bug to the tests.
This solves issue #4413.
shiftadd
did not consider underflows for unsigned shift-amounts.Specifically the issue arises if peepopt receives an expression like
Here an intended underflow occurs if
shift<1
. (by intended I mean it is what the current network implies, no matter what the designer might have wanted).This adds a filter for the case described and adds the bug to the tests.