Re: anti-ranges of signed variables

2016-11-13 Thread Jakub Jelinek
On Mon, Nov 14, 2016 at 02:13:51PM +1100, kugan wrote: > I think we should change the get_range_info to: > > diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c > index 913d142..f33b9c0 100644 > --- a/gcc/tree-ssanames.c > +++ b/gcc/tree-ssanames.c > @@ -371,7 +371,7 @@ get_range_info (const_tr

Re: anti-ranges of signed variables

2016-11-13 Thread kugan
I think we should change the get_range_info to: diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 913d142..f33b9c0 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -371,7 +371,7 @@ get_range_info (const_tree name, wide_int *min, wide_int *max) *min = ri->get_min ()

Re: anti-ranges of signed variables

2016-11-13 Thread kugan
Hi, On 12/11/16 06:19, Jakub Jelinek wrote: On Fri, Nov 11, 2016 at 11:51:34AM -0700, Martin Sebor wrote: On 11/11/2016 10:53 AM, Richard Biener wrote: On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor wrote: I noticed that variables of signed integer types that are constrained to a s

Re: anti-ranges of signed variables

2016-11-11 Thread Martin Sebor
On 11/11/2016 12:30 PM, Martin Sebor wrote: On 11/11/2016 12:12 PM, Andrew Pinski wrote: On Fri, Nov 11, 2016 at 10:51 AM, Martin Sebor wrote: On 11/11/2016 10:53 AM, Richard Biener wrote: On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor wrote: I noticed that variables of signed in

Re: anti-ranges of signed variables

2016-11-11 Thread Martin Sebor
On 11/11/2016 12:12 PM, Andrew Pinski wrote: On Fri, Nov 11, 2016 at 10:51 AM, Martin Sebor wrote: On 11/11/2016 10:53 AM, Richard Biener wrote: On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor wrote: I noticed that variables of signed integer types that are constrained to a specifi

Re: anti-ranges of signed variables

2016-11-11 Thread Jakub Jelinek
On Fri, Nov 11, 2016 at 11:51:34AM -0700, Martin Sebor wrote: > On 11/11/2016 10:53 AM, Richard Biener wrote: > >On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor > >wrote: > >>I noticed that variables of signed integer types that are constrained > >>to a specific subrange of values of the

Re: anti-ranges of signed variables

2016-11-11 Thread Andrew Pinski
On Fri, Nov 11, 2016 at 10:51 AM, Martin Sebor wrote: > On 11/11/2016 10:53 AM, Richard Biener wrote: >> >> On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor >> wrote: >>> >>> I noticed that variables of signed integer types that are constrained >>> to a specific subrange of values of the t

Re: anti-ranges of signed variables

2016-11-11 Thread Martin Sebor
On 11/11/2016 10:53 AM, Richard Biener wrote: On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor wrote: I noticed that variables of signed integer types that are constrained to a specific subrange of values of the type like so: [-TYPE_MAX + N, N] are reported by get_range_info as t

Re: anti-ranges of signed variables

2016-11-11 Thread Richard Biener
On November 11, 2016 6:34:37 PM GMT+01:00, Martin Sebor wrote: >I noticed that variables of signed integer types that are constrained >to a specific subrange of values of the type like so: > > [-TYPE_MAX + N, N] > >are reported by get_range_info as the anti-range > > [-TYPE_MAX, TYPE_MI

anti-ranges of signed variables

2016-11-11 Thread Martin Sebor
I noticed that variables of signed integer types that are constrained to a specific subrange of values of the type like so: [-TYPE_MAX + N, N] are reported by get_range_info as the anti-range [-TYPE_MAX, TYPE_MIN - 1] for all positive N of the type regardless of the variable's actual