Re: [PR 87415] handle 1 bit bit fields in set_value_range_with_overflow()

2018-09-27 Thread Richard Biener
On Wed, Sep 26, 2018 at 7:46 PM Aldy Hernandez wrote: > > As I've said in the PR... > > For a 1-bit signed field we are trying to subtract the following ranges: > > [0, 0] - VR_VARYING > > Mathematically these are: > > [MAX, MAX] - [MIN, MAX] > [0, 0] - [MIN, MAX] > => [0, 0] - [-1, 0]

[PR 87415] handle 1 bit bit fields in set_value_range_with_overflow()

2018-09-26 Thread Aldy Hernandez
As I've said in the PR... For a 1-bit signed field we are trying to subtract the following ranges: [0, 0] - VR_VARYING Mathematically these are: [MAX, MAX] - [MIN, MAX] [0, 0] - [MIN, MAX] => [0, 0] - [-1, 0] For ranges: [a, b] - [c, d] is [a - d, b - c], so combine_bounds() yields: