Re: all_ones_mask_p clarification

2013-08-29 Thread Richard Biener
On Wed, Aug 28, 2013 at 7:15 PM, Mike Stump wrote: > On Aug 28, 2013, at 2:40 AM, Richard Biener > wrote: >> Digging shows I at one point removed all this code - but people objected and >> I >> had to revert it :/ > > [ oh,, sorry to hear ] I got rid of it as well, and then the test suite beat

Re: all_ones_mask_p clarification

2013-08-28 Thread Mike Stump
On Aug 28, 2013, at 2:40 AM, Richard Biener wrote: > Digging shows I at one point removed all this code - but people objected and I > had to revert it :/ [ oh,, sorry to hear ] I got rid of it as well, and then the test suite beat on me til I relented. > I suppose this kind of cleanup should b

Re: all_ones_mask_p clarification

2013-08-28 Thread Richard Biener
On Tue, Aug 27, 2013 at 5:47 PM, Mike Stump wrote: > On Aug 27, 2013, at 3:23 AM, Richard Biener > wrote: >>> +++ b/gcc/fold-const.c >>> @@ -3702,12 +3702,23 @@ all_ones_mask_p (const_tree mask, int size) > >> This should instead use >> >> return tree_to_double_int (mask) == double_int::mask (

Re: all_ones_mask_p clarification

2013-08-27 Thread Mike Stump
On Aug 27, 2013, at 3:23 AM, Richard Biener wrote: >> +++ b/gcc/fold-const.c >> @@ -3702,12 +3702,23 @@ all_ones_mask_p (const_tree mask, int size) > This should instead use > > return tree_to_double_int (mask) == double_int::mask (size) > || (TYPE_PRECISION (mask) == size && tree_to_doubl

Re: all_ones_mask_p clarification

2013-08-27 Thread Richard Biener
On Mon, Aug 5, 2013 at 6:44 PM, Mike Stump wrote: > It is the intent for all_ones_mask_p to return true when 64 bits of ones in > an unsigned type of width 64 when size is 64, right? Currently the code uses > a signed type for tmask, which sets the upper bits to 1, when the value > includes th

Re: all_ones_mask_p clarification

2013-08-05 Thread Gabriel Dos Reis
On Mon, Aug 5, 2013 at 11:44 AM, Mike Stump wrote: > It is the intent for all_ones_mask_p to return true when 64 bits of ones in > an unsigned type of width 64 when size is 64, right? Currently the code uses > a signed type for tmask, which sets the upper bits to 1, when the value > includes t

all_ones_mask_p clarification

2013-08-05 Thread Mike Stump
It is the intent for all_ones_mask_p to return true when 64 bits of ones in an unsigned type of width 64 when size is 64, right? Currently the code uses a signed type for tmask, which sets the upper bits to 1, when the value includes the sign bit set and the equality code does check all 128 bit