Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-21 Thread Richard Biener
On Thu, Sep 21, 2017 at 3:15 PM, Bill Schmidt wrote: > On Sep 21, 2017, at 2:37 AM, Richard Biener wrote >> >> On Wed, Sep 20, 2017 at 9:17 PM, Bill Schmidt >> wrote: >>> On Sep 20, 2017, at 2:14 PM, Bill Schmidt >>> wrote: On Sep 20, 2017, at 3:49 AM, Richard Sandiford wrote:

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-21 Thread Bill Schmidt
On Sep 21, 2017, at 2:37 AM, Richard Biener wrote: > > On Wed, Sep 20, 2017 at 9:17 PM, Bill Schmidt > wrote: >> On Sep 20, 2017, at 2:14 PM, Bill Schmidt >> wrote: >>> >>> On Sep 20, 2017, at 3:49 AM, Richard Sandiford >>> wrote: But I think this shows up another problem. In th

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-21 Thread Richard Biener
On Wed, Sep 20, 2017 at 9:17 PM, Bill Schmidt wrote: > On Sep 20, 2017, at 2:14 PM, Bill Schmidt wrote: >> >> On Sep 20, 2017, at 3:49 AM, Richard Sandiford >> wrote: >>> >>> But I think this shows up another problem. In the vectorised loop, >>> we have 1 copy of the load and 4 copies of the A

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-20 Thread Bill Schmidt
On Sep 20, 2017, at 2:14 PM, Bill Schmidt wrote: > > On Sep 20, 2017, at 3:49 AM, Richard Sandiford > wrote: >> >> But I think this shows up another problem. In the vectorised loop, >> we have 1 copy of the load and 4 copies of the ABS (after unpacking). >> But vect_analyze_slp_cost_1 is bein

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-20 Thread Bill Schmidt
On Sep 20, 2017, at 3:49 AM, Richard Sandiford wrote: > > But I think this shows up another problem. In the vectorised loop, > we have 1 copy of the load and 4 copies of the ABS (after unpacking). > But vect_analyze_slp_cost_1 is being called with ncopies_for_cost == 4 > even for the loads. So

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-20 Thread Bill Schmidt
On Sep 20, 2017, at 3:49 AM, Richard Sandiford wrote: > > Bill Schmidt writes: >> On Sep 19, 2017, at 4:21 PM, Bill Schmidt >> wrote: >>> On Sep 19, 2017, at 3:58 PM, Richard Sandiford >>> wrote: Bill Schmidt writes: > Index: gcc/tree-vect-stmts.c >

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-20 Thread Richard Sandiford
Bill Schmidt writes: > On Sep 19, 2017, at 4:21 PM, Bill Schmidt wrote: >> On Sep 19, 2017, at 3:58 PM, Richard Sandiford >> wrote: >>> Bill Schmidt writes: Index: gcc/tree-vect-stmts.c === --- gcc/tree-vect-stmts.c

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-19 Thread Bill Schmidt
On Sep 19, 2017, at 4:21 PM, Bill Schmidt wrote: > > On Sep 19, 2017, at 3:58 PM, Richard Sandiford > wrote: >> >> Bill Schmidt writes: >>> Index: gcc/tree-vect-stmts.c >>> === >>> --- gcc/tree-vect-stmts.c (revision 252760) >>

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-19 Thread Bill Schmidt
On Sep 19, 2017, at 3:58 PM, Richard Sandiford wrote: > > Bill Schmidt writes: >> Index: gcc/tree-vect-stmts.c >> === >> --- gcc/tree-vect-stmts.c(revision 252760) >> +++ gcc/tree-vect-stmts.c(working copy) >> @@ -1091,8 +1

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-19 Thread Richard Sandiford
Bill Schmidt writes: > Index: gcc/tree-vect-stmts.c > === > --- gcc/tree-vect-stmts.c (revision 252760) > +++ gcc/tree-vect-stmts.c (working copy) > @@ -1091,8 +1091,19 @@ vect_model_load_cost (stmt_vec_info stmt_info, int >

Re: [PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-19 Thread Bill Schmidt
On 9/19/17 12:38 PM, Bill Schmidt wrote: > Hi, > > https://gcc.gnu.org/PR82255 identifies a problem in the vector cost model > where a vectorized load is treated as having the cost of a strided load > in a case where we will not actually generate a strided load. This is > simply a mismatch between

[PATCH] Fix PR82255 (vectorizer cost model overcounts some vector load costs)

2017-09-19 Thread Bill Schmidt
Hi, https://gcc.gnu.org/PR82255 identifies a problem in the vector cost model where a vectorized load is treated as having the cost of a strided load in a case where we will not actually generate a strided load. This is simply a mismatch between the conditions tested in the cost model and those t