Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-04 Thread Richard Biener
On Wed, Dec 4, 2013 at 1:03 AM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Biener richard.guent...@gmail.com 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

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-03 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com 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

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-02 Thread Richard Biener
On Sat, Nov 30, 2013 at 10:43 AM, Richard Sandiford rdsandif...@googlemail.com 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 int N inline unsigned int

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-02 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com writes: On Sat, Nov 30, 2013 at 10:43 AM, Richard Sandiford rdsandif...@googlemail.com 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

Re: Add TREE_INT_CST_OFFSET_NUNITS

2013-12-02 Thread Richard Biener
On Mon, Dec 2, 2013 at 2:48 PM, Richard Sandiford rdsandif...@googlemail.com wrote: Richard Biener richard.guent...@gmail.com writes: On Sat, Nov 30, 2013 at 10:43 AM, Richard Sandiford rdsandif...@googlemail.com wrote: So maybe two INTEGER_CST lengths weren't enough. Because bitsizetype can

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 int N inline unsigned int wi::extended_tree N::get_len () const { if (N == MAX_BITSIZE_MODE_ANY_INT || N