This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix gather/scatter check when updating a vector epilogue loop


On Fri, Jan 10, 2020 at 1:39 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> update_epilogue_loop_vinfo applies SSA renmaing to the DR_REF of a
> gather or scatter, so that vect_check_gather_scatter continues to work.
> However, we sometimes also rely on vect_check_gather_scatter when
> using gathers and scatters to implement strided accesses.
>
> This showed up on existing tests when testing with fixed-length
> -msve-vector-bits=128.
>
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  Maybe verging
> on the obvious, but: OK to install?

OK.

> Richard
>
>
> 2020-01-10  Richard Sandiford  <richard.sandiford@arm.com>
>
> gcc/
>         * tree-vect-loop.c (update_epilogue_loop_vinfo): Update DR_REF
>         for any type of gather or scatter, including strided accesses.
>
> Index: gcc/tree-vect-loop.c
> ===================================================================
> --- gcc/tree-vect-loop.c        2020-01-06 12:58:08.877844402 +0000
> +++ gcc/tree-vect-loop.c        2020-01-10 12:37:58.683829420 +0000
> @@ -8458,7 +8458,7 @@ update_epilogue_loop_vinfo (class loop *
>          updated offset we set using ADVANCE.  Instead we have to make sure the
>          reference in the data references point to the corresponding copy of
>          the original in the epilogue.  */
> -      if (STMT_VINFO_GATHER_SCATTER_P (stmt_vinfo))
> +      if (STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_vinfo) == VMAT_GATHER_SCATTER)
>         {
>           DR_REF (dr)
>             = simplify_replace_tree (DR_REF (dr), NULL_TREE, NULL_TREE,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]