Re: [PATCH 5/6]tree-sra.c: Fix completely_scalarize for negative array indices

2015-11-06 Thread Richard Biener
On Thu, Nov 5, 2015 at 2:22 PM, Alan Lawrence wrote: > On 30/10/15 10:54, Eric Botcazou wrote: >> On 30/10/15 10:44, Richard Biener wrote: >>> >>> I think you want to use wide-ints here and >>> >>> wide_int idx = wi::from (minidx, TYPE_PRECISION (TYPE_DOMAIN >>> (...)), TYPE_SIGN (TYPE_DOMAIN

Re: [PATCH 5/6]tree-sra.c: Fix completely_scalarize for negative array indices

2015-11-05 Thread Alan Lawrence
On 30/10/15 10:54, Eric Botcazou wrote: > On 30/10/15 10:44, Richard Biener wrote: >> >> I think you want to use wide-ints here and >> >> wide_int idx = wi::from (minidx, TYPE_PRECISION (TYPE_DOMAIN >> (...)), TYPE_SIGN (TYPE_DOMAIN (..))); >> wide_int maxidx = ... >> >> you can then simply

Re: [PATCH 5/6]tree-sra.c: Fix completely_scalarize for negative array indices

2015-10-30 Thread Eric Botcazou
> I think you want to use wide-ints here and > >wide_int idx = wi::from (minidx, TYPE_PRECISION (TYPE_DOMAIN > (...)), TYPE_SIGN (TYPE_DOMAIN (..))); >wide_int maxidx = ... > > you can then simply iterate minidx with ++ and do the final compare > against maxidx > with while (++idx <= maxi

Re: [PATCH 5/6]tree-sra.c: Fix completely_scalarize for negative array indices

2015-10-30 Thread Richard Biener
On Thu, Oct 29, 2015 at 8:18 PM, Alan Lawrence wrote: > The code I added to completely_scalarize for arrays isn't right in some cases > of negative array indices (e.g. arrays with indices from -1 to 1 in the Ada > testsuite). On ARM, this prevents a failure bootstrapping Ada with the next > patch,

[PATCH 5/6]tree-sra.c: Fix completely_scalarize for negative array indices

2015-10-29 Thread Alan Lawrence
The code I added to completely_scalarize for arrays isn't right in some cases of negative array indices (e.g. arrays with indices from -1 to 1 in the Ada testsuite). On ARM, this prevents a failure bootstrapping Ada with the next patch, as well as a few ACATS tests (e.g. c64106a). Some discussion