public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Sandiford <richard.sandiford@arm.com>
Subject: Re: [PATCH] vect: Remove several useless VMAT_INVARIANT checks
Date: Mon, 14 Aug 2023 14:03:33 +0200	[thread overview]
Message-ID: <CAFiYyc0Pt5ePOQY9Ej=RMwNjwgDfqC6a66yEC-XkFWo4tMTkfw@mail.gmail.com> (raw)
In-Reply-To: <bfdd58d9-577b-ea7b-d9fc-57ff565f5866@linux.ibm.com>

On Mon, Aug 14, 2023 at 10:52 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi,
>
> In function vectorizable_load, there is one hunk which is
> dedicated for the handlings on VMAT_INVARIANT and return
> early, it means we shouldn't encounter any cases with
> memory_access_type VMAT_INVARIANT in the following code
> after that.  This patch is to clean up several useless
> checks on VMAT_INVARIANT.  There should be no functional
> changes.
>
> Bootstrapped and regtested on x86_64-redhat-linux,
> aarch64-linux-gnu and powerpc64{,le}-linux-gnu.

OK.

> gcc/ChangeLog:
>
>         * tree-vect-stmts.cc (vectorizable_load): Remove some useless checks
>         on VMAT_INVARIANT.
> ---
>  gcc/tree-vect-stmts.cc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> index 89607a98f99..d4e781531fd 100644
> --- a/gcc/tree-vect-stmts.cc
> +++ b/gcc/tree-vect-stmts.cc
> @@ -10499,7 +10499,7 @@ vectorizable_load (vec_info *vinfo,
>               tree bias = NULL_TREE;
>               if (!costing_p)
>                 {
> -                 if (loop_masks && memory_access_type != VMAT_INVARIANT)
> +                 if (loop_masks)
>                     final_mask
>                       = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,
>                                             vec_num * ncopies, vectype,
> @@ -10729,7 +10729,7 @@ vectorizable_load (vec_info *vinfo,
>                         bias = build_int_cst (intQI_type_node, biasval);
>                       }
>
> -                   if (final_len && memory_access_type != VMAT_INVARIANT)
> +                   if (final_len)
>                       {
>                         tree ptr
>                           = build_int_cst (ref_type, align * BITS_PER_UNIT);
> --
> 2.31.1

      reply	other threads:[~2023-08-14 12:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14  8:52 Kewen.Lin
2023-08-14 12:03 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc0Pt5ePOQY9Ej=RMwNjwgDfqC6a66yEC-XkFWo4tMTkfw@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=richard.sandiford@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).