From: Richard Biener <richard.guenther@gmail.com>
To: Feng Xue OS <fxue@os.amperecomputing.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/8] vect: Remove duplicated check on reduction operand
Date: Wed, 19 Jun 2024 14:35:26 +0200 [thread overview]
Message-ID: <CAFiYyc2jbU=Z4EPb3ADFVc-O2Z2EqFQ3_QTW7uRU6fKuP+_VkQ@mail.gmail.com> (raw)
In-Reply-To: <LV2PR01MB7839CD3963A092459BA13D32F7CC2@LV2PR01MB7839.prod.exchangelabs.com>
On Sun, Jun 16, 2024 at 9:22 AM Feng Xue OS <fxue@os.amperecomputing.com> wrote:
>
> In vectorizable_reduction, one check on a reduction operand via index could be
> contained by another one check via pointer, so remove the former.
OK.
Thanks,
Richard.
> Thanks,
> Feng
>
> ---
> gcc/
> * tree-vect-loop.cc (vectorizable_reduction): Remove the duplicated
> check.
> ---
> gcc/tree-vect-loop.cc | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
> index d9a2ad69484..6e8b3639daf 100644
> --- a/gcc/tree-vect-loop.cc
> +++ b/gcc/tree-vect-loop.cc
> @@ -7815,11 +7815,9 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
> "use not simple.\n");
> return false;
> }
> - if (i == STMT_VINFO_REDUC_IDX (stmt_info))
> - continue;
>
> - /* For an IFN_COND_OP we might hit the reduction definition operand
> - twice (once as definition, once as else). */
> + /* Skip reduction operands, and for an IFN_COND_OP we might hit the
> + reduction operand twice (once as definition, once as else). */
> if (op.ops[i] == op.ops[STMT_VINFO_REDUC_IDX (stmt_info)])
> continue;
>
> --
> 2.17.1
prev parent reply other threads:[~2024-06-19 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-16 7:22 Feng Xue OS
2024-06-19 12:35 ` 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='CAFiYyc2jbU=Z4EPb3ADFVc-O2Z2EqFQ3_QTW7uRU6fKuP+_VkQ@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=fxue@os.amperecomputing.com \
--cc=gcc-patches@gcc.gnu.org \
/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).