This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: anti-ranges of signed variables


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_tree name, wide_int *min, wide_int
> *max)
> 
>    *min = ri->get_min ();
>    *max = ri->get_max ();
> -  return SSA_NAME_RANGE_TYPE (name);
> +  return SSA_NAME_RANGE_TYPE (name) ? VR_ANTI_RANGE : VR_RANGE;

Why?

#define SSA_NAME_RANGE_TYPE(N) \
    (SSA_NAME_ANTI_RANGE_P (N) ? VR_ANTI_RANGE : VR_RANGE)

>  }
> 
> Is this OK after testing ?

No.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]