public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/rguenth/heads/vect-force-slp)] Avoid SLP build failure for unsupported shifts
Date: Thu,  2 Nov 2023 14:00:01 +0000 (GMT)	[thread overview]
Message-ID: <20231102140001.18AA43856DEA@sourceware.org> (raw)

https://gcc.gnu.org/g:bcddead27931294a909686a38daf1df661845366

commit bcddead27931294a909686a38daf1df661845366
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Oct 5 14:07:02 2023 +0200

    Avoid SLP build failure for unsupported shifts
    
    When asserting that SLP _build_ can succeed we run into the SLP
    shift discovery code trying to be clever doing vectorizable_shifts
    work and failing discovery already.  That gives a false impression
    for now, so disable that when we do single-lane builds.
    
            * tree-vect-slp.cc (vect_build_slp_tree_1): Do not fail
            fatally for shifts not supported by the target when discovering
            a single lane.

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

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 9d7b74cb9f25..f6741433ae17 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -1215,7 +1215,13 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	      if (!directly_supported_p (rhs_code, vectype, optab_vector))
 		{
 		  /* No vector/vector shift, try for a vector/scalar shift.  */
-		  if (!directly_supported_p (rhs_code, vectype, optab_scalar))
+		  if (!directly_supported_p (rhs_code, vectype, optab_scalar)
+		      /* ???  We are using this to guide operand swapping to
+			 eventually make all shift operands the same but we
+			 shouldn't fail in the end - that's be business of
+			 vectorizable_shift.
+			 Avoid spurious ICEs for single-lane discovery.  */
+		      && group_size != 1)
 		    {
 		      if (dump_enabled_p ())
 			dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,

             reply	other threads:[~2023-11-02 14:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 14:00 Richard Biener [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-13 14:27 Richard Biener
2024-02-23  7:31 Richard Biener
2023-11-09 13:03 Richard Biener
2023-10-19 13:29 Richard Biener
2023-10-16 12:50 Richard Biener
2023-10-06  7:07 Richard Biener

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=20231102140001.18AA43856DEA@sourceware.org \
    --to=rguenth@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).