Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-04 Thread Richard Biener
On Wed, Dec 4, 2013 at 1:03 AM, Richard Sandiford wrote: > Richard Biener writes: Looking at the implementation it seems it would also work with return MIN (TREE_INT_CST_EXT_NUNITS (m_t), N / HOST_BITS_PER_WIDE_INT); >>> >>> Yeah, the MIN in the patch was probably bogus sorry.

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-03 Thread Richard Sandiford
Richard Biener writes: >>> Looking at the implementation it seems it would also work with >>> >>>return MIN (TREE_INT_CST_EXT_NUNITS (m_t), N / HOST_BITS_PER_WIDE_INT); >> >> Yeah, the MIN in the patch was probably bogus sorry. It only works >> if we can assume that no bitsizetype will have A

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-02 Thread Richard Biener
On Mon, Dec 2, 2013 at 2:48 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Sat, Nov 30, 2013 at 10:43 AM, Richard Sandiford >> wrote: >>> So maybe two INTEGER_CST lengths weren't enough. Because bitsizetype >>> can be offset_int-sized, wi::to_offset had a TYPE_PRECISION condition >

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-02 Thread Richard Sandiford
Richard Biener writes: > On Sat, Nov 30, 2013 at 10:43 AM, Richard Sandiford > wrote: >> So maybe two INTEGER_CST lengths weren't enough. Because bitsizetype >> can be offset_int-sized, wi::to_offset had a TYPE_PRECISION condition >> to pick the array length: >> >> template >> inline unsigned i

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-02 Thread Richard Biener
On Sat, Nov 30, 2013 at 10:43 AM, Richard Sandiford wrote: > So maybe two INTEGER_CST lengths weren't enough. Because bitsizetype > can be offset_int-sized, wi::to_offset had a TYPE_PRECISION condition > to pick the array length: > > template > inline unsigned int > wi::extended_tree ::get_len (

Add TREE_INT_CST_OFFSET_NUNITS

2013-11-30 Thread Richard Sandiford
So maybe two INTEGER_CST lengths weren't enough. Because bitsizetype can be offset_int-sized, wi::to_offset had a TYPE_PRECISION condition to pick the array length: template inline unsigned int wi::extended_tree ::get_len () const { if (N == MAX_BITSIZE_MODE_ANY_INT || N > TYPE_PRECISION