Re: patch to canonize unsigned tree-csts

2013-10-18 Thread Richard Sandiford
Richard Biener writes: > On Wed, 16 Oct 2013, Kenneth Zadeck wrote: > >> On 10/15/2013 02:30 PM, Richard Sandiford wrote: >> > Richard Sandiford writes: >> > >if (small_prec) >> > > ; >> > >else if (precision == xprecision) >> > > while (len >= 0 && val[len - 1]

Re: patch to canonize unsigned tree-csts

2013-10-17 Thread Richard Biener
On Wed, 16 Oct 2013, Kenneth Zadeck wrote: > On 10/15/2013 02:30 PM, Richard Sandiford wrote: > > Richard Sandiford writes: > > >if (small_prec) > > > ; > > >else if (precision == xprecision) > > > while (len >= 0 && val[len - 1] == -1) > > >len--; >

Re: patch to canonize unsigned tree-csts

2013-10-17 Thread Richard Sandiford
Kenneth Zadeck writes: > On 10/15/2013 02:30 PM, Richard Sandiford wrote: >> Richard Sandiford writes: >>>if (small_prec) >>> ; >>>else if (precision == xprecision) >>> while (len >= 0 && val[len - 1] == -1) >>>len--; >> Err, len > 0 obviously. > you

Re: patch to canonize unsigned tree-csts

2013-10-16 Thread Kenneth Zadeck
On 10/15/2013 02:30 PM, Richard Sandiford wrote: Richard Sandiford writes: if (small_prec) ; else if (precision == xprecision) while (len >= 0 && val[len - 1] == -1) len--; Err, len > 0 obviously. you were only close.patch tested on ppc and commit

Re: patch to canonize unsigned tree-csts

2013-10-15 Thread Richard Sandiford
Richard Sandiford writes: > if (small_prec) > ; > else if (precision == xprecision) > while (len >= 0 && val[len - 1] == -1) > len--; Err, len > 0 obviously.

Re: patch to canonize unsigned tree-csts

2013-10-15 Thread Richard Sandiford
Thanks for doing this. Kenneth Zadeck writes: > @@ -1204,11 +1204,11 @@ wide_int_to_tree (tree type, const wide_ > } > >wide_int cst = wide_int::from (pcst, prec, sgn); > - int len = int (cst.get_len ()); > - int small_prec = prec & (HOST_BITS_PER_WIDE_INT - 1); > + unsigned int len

Re: patch to canonize unsigned tree-csts

2013-10-15 Thread Kenneth Zadeck
i added the assertion that richard requested and tested this on x86-64. committed as revision 203602. On 10/06/2013 05:13 AM, Richard Sandiford wrote: Kenneth Zadeck writes: On 10/04/2013 01:00 PM, Richard Sandiford wrote: I was hoping Richard would weigh in here. In case not... Kenneth Z

Re: patch to canonize unsigned tree-csts

2013-10-06 Thread Richard Sandiford
Kenneth Zadeck writes: > On 10/04/2013 01:00 PM, Richard Sandiford wrote: >> I was hoping Richard would weigh in here. In case not... >> >> Kenneth Zadeck writes: >> I was thinking that we should always be able to use the constant as-is >> for max_wide_int-based and addr_wide_int-based o

Re: patch to canonize unsigned tree-csts

2013-10-04 Thread Kenneth Zadeck
On 10/04/2013 01:00 PM, Richard Sandiford wrote: I was hoping Richard would weigh in here. In case not... Kenneth Zadeck writes: I was thinking that we should always be able to use the constant as-is for max_wide_int-based and addr_wide_int-based operations. The small_prec again, you can ge

Re: patch to canonize unsigned tree-csts

2013-10-04 Thread Richard Sandiford
I was hoping Richard would weigh in here. In case not... Kenneth Zadeck writes: I was thinking that we should always be able to use the constant as-is for max_wide_int-based and addr_wide_int-based operations. The small_prec >>> again, you can get edge cased to death here.i think

Re: patch to canonize unsigned tree-csts

2013-10-03 Thread Kenneth Zadeck
I was thinking that we should always be able to use the constant as-is for max_wide_int-based and addr_wide_int-based operations. The small_prec again, you can get edge cased to death here.i think it would work for max because that really is bigger than anything else, but it is possible (t