public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Philipp Tomsich <ptomsich@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/vrull/heads/slp-improvements)] Slightly restrict preconditions for vect_slp_optimize_permutes
Date: Wed, 17 Jan 2024 19:14:56 +0000 (GMT)	[thread overview]
Message-ID: <20240117191456.BD3E53858409@sourceware.org> (raw)

https://gcc.gnu.org/g:5c262464666155ff596dd9cb081fa18062164320

commit 5c262464666155ff596dd9cb081fa18062164320
Author: Manolis Tsamis <manolis.tsamis@vrull.eu>
Date:   Fri Dec 1 11:07:56 2023 +0100

    Slightly restrict preconditions for vect_slp_optimize_permutes

Diff:
---
 gcc/tree-vect-slp.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 20acfba887d..30ac656a0af 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -8144,7 +8144,8 @@ recognise_perm_binop_perm_pattern (gassign *stmt, enum tree_code *binop1,
     return false;
 
   if (gimple_assign_rhs1 (bop1) != gimple_assign_rhs1 (bop2)
-      || gimple_assign_rhs2 (bop1) != gimple_assign_rhs2 (bop2))
+      || gimple_assign_rhs2 (bop1) != gimple_assign_rhs2 (bop2)
+      || bop1 == bop2)
     return false;
 
   tree src1_perm = gimple_assign_rhs1 (bop1);
@@ -8153,8 +8154,8 @@ recognise_perm_binop_perm_pattern (gassign *stmt, enum tree_code *binop1,
   gassign *perm1, *perm2;
   if (!(perm1 = get_tree_def(src1_perm, false))
       || !(perm2 = get_tree_def(src2_perm, false))
-      || num_imm_uses (src1_perm) > 2
-      || num_imm_uses (src2_perm) > 2
+      || num_imm_uses (src1_perm) != 2
+      || num_imm_uses (src2_perm) != 2
       || gimple_assign_rhs_code (perm1) != VEC_PERM_EXPR
       || gimple_assign_rhs_code (perm2) != VEC_PERM_EXPR
       || gimple_assign_rhs1 (perm1) != gimple_assign_rhs2 (perm1)

             reply	other threads:[~2024-01-17 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 19:14 Philipp Tomsich [this message]
2024-01-23 20:58 Philipp Tomsich

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=20240117191456.BD3E53858409@sourceware.org \
    --to=ptomsich@gcc.gnu.org \
    --cc=gcc-cvs@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).