Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-04 Thread Richard Biener
On November 4, 2019 4:30:57 PM GMT+01:00, Joel Hutton wrote: >First copy bounced from mailing list. > > > On 30/10/2019 13:49, Richard Biener wrote: > > >  >> >> >  >>  * expr.c (store_constructor): Add case for constructor >of > > > vectors. > > >  > Why do you need this?  The vectorizer

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-04 Thread Joel Hutton
First copy bounced from mailing list. > > On 30/10/2019 13:49, Richard Biener wrote: > >  >> > >  >>  * expr.c (store_constructor): Add case for constructor of > > vectors. > >  > Why do you need this?  The vectorizer already creates such CTORs.  Any > >  > testcase that you can show

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-04 Thread Richard Biener
On Fri, 1 Nov 2019, Joel Hutton wrote: > On 30/10/2019 13:49, Richard Biener wrote: > >> > >>  * expr.c (store_constructor): Add case for constructor of > vectors. > > Why do you need this?  The vectorizer already creates such CTORs.  Any > > testcase that you can show? > > > > type

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-11-01 Thread Joel Hutton
On 30/10/2019 13:49, Richard Biener wrote: >> >>  * expr.c (store_constructor): Add case for constructor of vectors. > Why do you need this?  The vectorizer already creates such CTORs.  Any > testcase that you can show? > > typedef long v2di __attribute__((vector_size(16))); > v2di

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-10-30 Thread Joel Hutton
On 30/10/2019 14:51, Richard Biener wrote: > On Wed, 30 Oct 2019, Joel Hutton wrote: > >> On 30/10/2019 13:49, Richard Biener wrote: >>> Why do you need this? The vectorizer already creates such CTORs. Any >>> testcase that you can show? >> typedef long v2di __attribute__((vector_size(16))); >>

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-10-30 Thread Richard Biener
On Wed, 30 Oct 2019, Joel Hutton wrote: > On 30/10/2019 13:49, Richard Biener wrote: > > Why do you need this? The vectorizer already creates such CTORs. Any > > testcase that you can show? > > typedef long v2di __attribute__((vector_size(16))); > v2di v; > void > foo() > { >   v = (v2di){v[1]

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-10-30 Thread Joel Hutton
On 30/10/2019 13:49, Richard Biener wrote: > Why do you need this? The vectorizer already creates such CTORs. Any > testcase that you can show? typedef long v2di __attribute__((vector_size(16))); v2di v; void foo() {   v = (v2di){v[1], v[0]}; } >> * tree-vect-slp.c (vect_analyze_slp

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-10-30 Thread Richard Biener
On Wed, 30 Oct 2019, Joel Hutton wrote: > On 15/10/2019 13:11, Richard Biener wrote: > >>  > You miss to check that CONSTRUCTOR_NELTS == TYPE_VECTOR_SUBPARTS > >>  > (we can have omitted trailing zeros). > > > > ^^^ > > > > I don't see this being handled?  You give up on non-SSA names > > b

[SLP] SLP vectorization: vectorize vector constructors

2019-10-30 Thread Joel Hutton
On 15/10/2019 13:11, Richard Biener wrote: >>  > You miss to check that CONSTRUCTOR_NELTS == TYPE_VECTOR_SUBPARTS >>  > (we can have omitted trailing zeros). > > ^^^ > > I don't see this being handled?  You give up on non-SSA names > but not on the omitted trailing zeros. I had thought chec

Re: [SLP] SLP vectorization: vectorize vector constructors

2019-10-15 Thread Richard Biener
On Fri, 11 Oct 2019, Joel Hutton wrote: > Hi Richard, > > Thanks for your help, I've reworked my SLP RFC based on your feedback. > > I think a better place for the loop searching for CONSTRUCTORs is > > vect_slp_analyze_bb_1 where I'd put it before the check you remove, > > and I'd simply appe

[SLP] SLP vectorization: vectorize vector constructors

2019-10-11 Thread Joel Hutton
Hi Richard, Thanks for your help, I've reworked my SLP RFC based on your feedback. > I think a better place for the loop searching for CONSTRUCTORs is > vect_slp_analyze_bb_1 where I'd put it before the check you remove, > and I'd simply append found CONSTRUCTORs to the grouped_stores > array

Re: [RFC][SLP] SLP vectorization: vectorize vector constructors

2019-10-01 Thread Richard Biener
On Tue, 1 Oct 2019, Joel Hutton wrote: > On 01/10/2019 12:07, Joel wrote: > > > > SLP vectorization: vectorize vector constructors > > > > > > Currently SLP vectorization can build SLP trees staring from > > reductions or from group stores. This patch adds a third starting > > point: vector cons

[RFC][SLP] SLP vectorization: vectorize vector constructors

2019-10-01 Thread Joel Hutton
On 01/10/2019 12:07, Joel wrote: > > SLP vectorization: vectorize vector constructors > > > Currently SLP vectorization can build SLP trees staring from > reductions or from group stores. This patch adds a third starting > point: vector constructors. > > > For the following test case (compiled wi

[RFC][SLP] SLP vectorization: vectorize vector constructors

2019-10-01 Thread Joel Hutton
Hi all, Currently SLP vectorization can build SLP trees starting from reductions or from group stores. This patch adds a third starting point: vector constructors. For the following aarch64 test case (compiled with -O3 -fno-vect-cost-model): char g_d[1024], g_s1[1024], g_s2[1024]; void test_