On Mon, 11 Sep 2017, Vidya Praveen wrote: > On Tue, Sep 05, 2017 at 03:12:47PM +0200, Richard Biener wrote: > > On Tue, 5 Sep 2017, Tamar Christina wrote: > > > > > > > > > > > > -----Original Message----- > > > > From: Richard Biener [mailto:rguent...@suse.de] > > > > Sent: 05 September 2017 13:51 > > > > To: Tamar Christina > > > > Cc: Andrew Pinski; Andreas Schwab; Jon Beniston; > > > > gcc-patches@gcc.gnu.org; > > > > nd > > > > Subject: RE: [RFC, vectorizer] Allow single element vector types for > > > > vector > > > > reduction operations > > > > > > > > On Tue, 5 Sep 2017, Richard Biener wrote: > > > > > > > > > On Tue, 5 Sep 2017, Tamar Christina wrote: > > > > > > > > > > > Hi Richard, > > > > > > > > > > > > That was an really interesting analysis, thanks for the details! > > > > > > > > > > > > Would you be submitting the patch you proposed at the end as a fix? > > > > > > > > > > I'm testing it currently. > > > > > > > > Unfortunately it breaks some required lowering. I'll have to more > > > > closely > > > > look at this. > > > > > > Ah, ok. In the meantime, can this patch be reverted? It's currently > > > breaking spec for us so we're > > > Not able to get any benchmarking numbers. > > > > Testing the following instead: > > Any news on this?
Didn't work out as expected. I think the logic in tree-vect-generic is the one to be fixed but I have to carve out some time to look into it so stay tuned. Richard. > VP. > > > > > > Index: gcc/tree-vect-generic.c > > =================================================================== > > --- gcc/tree-vect-generic.c (revision 251642) > > +++ gcc/tree-vect-generic.c (working copy) > > @@ -1640,7 +1640,7 @@ expand_vector_operations_1 (gimple_stmt_ > > || code == VEC_UNPACK_FLOAT_LO_EXPR) > > type = TREE_TYPE (rhs1); > > > > - /* For widening/narrowing vector operations, the relevant type is of > > the > > + /* For widening vector operations, the relevant type is of the > > arguments, not the widened result. VEC_UNPACK_FLOAT_*_EXPR is > > calculated in the same way above. */ > > if (code == WIDEN_SUM_EXPR > > @@ -1650,9 +1650,6 @@ expand_vector_operations_1 (gimple_stmt_ > > || code == VEC_WIDEN_MULT_ODD_EXPR > > || code == VEC_UNPACK_HI_EXPR > > || code == VEC_UNPACK_LO_EXPR > > - || code == VEC_PACK_TRUNC_EXPR > > - || code == VEC_PACK_SAT_EXPR > > - || code == VEC_PACK_FIX_TRUNC_EXPR > > || code == VEC_WIDEN_LSHIFT_HI_EXPR > > || code == VEC_WIDEN_LSHIFT_LO_EXPR) > > type = TREE_TYPE (rhs1); > > > > > > also fix for a bug uncovered by the previous one: > > > > Index: gcc/gimple-ssa-strength-reduction.c > > =================================================================== > > --- gcc/gimple-ssa-strength-reduction.c (revision 251710) > > +++ gcc/gimple-ssa-strength-reduction.c (working copy) > > @@ -1742,8 +1742,7 @@ find_candidates_dom_walker::before_dom_c > > slsr_process_ref (gs); > > > > else if (is_gimple_assign (gs) > > - && SCALAR_INT_MODE_P > > - (TYPE_MODE (TREE_TYPE (gimple_assign_lhs (gs))))) > > + && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs)))) > > { > > tree rhs1 = NULL_TREE, rhs2 = NULL_TREE; > > > > > > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)