On Thu, Mar 26, 2020 at 12:01 PM Kewen.Lin <li...@linux.ibm.com> wrote:
>
> Hi Richi,
>
> on 2020/3/25 下午4:25, Richard Biener wrote:
> > On Tue, Mar 24, 2020 at 9:30 AM Kewen.Lin <li...@linux.ibm.com> wrote:
> >>
> >> Hi,
> >>
> >> The new version with refactoring has been attached.
> >> Bootstrapped/regtested on powerpc64le-linux-gnu (LE) P8 and P9.
> >>
> >> Is it ok for trunk?
> >
> > Yes.
> >
>
> Thanks!  I'm sorry that I forgot to update the nelts with new element number
> for smaller vector for the path constructing with smaller vectors.
>
> The difference against the previous one is:
>
> --- a/gcc/tree-vect-stmts.c
> +++ b/gcc/tree-vect-stmts.c
> @@ -2251,12 +2251,13 @@ vector_vector_composition_type (tree vtype, 
> poly_uint64 nelts, tree *ptype)
>        /* First check if vec_init optab supports construction from
>          vector pieces directly.  */
>        scalar_mode elmode = SCALAR_TYPE_MODE (TREE_TYPE (vtype));
> +      poly_uint64 inelts = pbsize / GET_MODE_BITSIZE (elmode);
>        machine_mode rmode;
> -      if (related_vector_mode (vmode, elmode, nelts).exists (&rmode)
> +      if (related_vector_mode (vmode, elmode, inelts).exists (&rmode)
>           && (convert_optab_handler (vec_init_optab, vmode, rmode)
>               != CODE_FOR_nothing))
>         {
> -         *ptype = build_vector_type (TREE_TYPE (vtype), nelts);
> +         *ptype = build_vector_type (TREE_TYPE (vtype), inelts);
>           return vtype;
>         }
>
> This new version has been bootstrapped/regtested on
> powerpc64le-linux-gnu (LE) P8 and x86_64-redhat-linux.
>
> May I install this new instead?

Yes.

Richard.

> BR,
> Kewen
> ---------
> gcc/ChangeLog
>
> 2020-MM-DD  Kewen Lin  <li...@gcc.gnu.org>
>
>         PR tree-optimization/90332
>         * gcc/tree-vect-stmts.c (vector_vector_composition_type): New 
> function.
>         (get_group_load_store_type): Adjust to call 
> vector_vector_composition_type,
>         extend it to construct with scalar types.
>         (vectorizable_load): Likewise.

Reply via email to