public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/114164] simdclone vectorization creates unsupported IL
Date: Fri, 01 Mar 2024 10:12:04 +0000	[thread overview]
Message-ID: <bug-114164-4-9AtKiK0QhV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114164-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114164

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following fixes this, it also shows that even with -mavx2 we don't support
this (as was expected after the analysis).  Note since we emit
mask ? {true,..} : {false,...} we only support in-branch clones when the
target has corresponding vcond_mask expanders.  For vcondeq we'd need to
emit a redundant mask != mask_false_cst compare

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index be0e1a9c69d..14a3ffb5f02 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -4210,6 +4210,16 @@ vectorizable_simd_clone_call (vec_info *vinfo,
stmt_vec_info stmt_info,
                                     " supported for mismatched vector
sizes.\n");
                  return false;
                }
+             if (!expand_vec_cond_expr_p (clone_arg_vectype,
+                                          arginfo[i].vectype, ERROR_MARK))
+               {
+                 if (dump_enabled_p ())
+                   dump_printf_loc (MSG_MISSED_OPTIMIZATION,
+                                    vect_location,
+                                    "cannot compute mask argument for"
+                                    " in-branch vector clones.\n");
+                 return false;
+               }
            }
          else if (SCALAR_INT_MODE_P (bestn->simdclone->mask_mode))
            {

  parent reply	other threads:[~2024-03-01 10:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 11:28 [Bug tree-optimization/114164] New: " rguenth at gcc dot gnu.org
2024-02-29 11:30 ` [Bug tree-optimization/114164] " rguenth at gcc dot gnu.org
2024-02-29 17:42 ` jakub at gcc dot gnu.org
2024-03-01  2:29 ` liuhongt at gcc dot gnu.org
2024-03-01  9:32 ` rguenth at gcc dot gnu.org
2024-03-01 10:12 ` rguenth at gcc dot gnu.org [this message]
2024-03-04 12:41 ` cvs-commit at gcc dot gnu.org
2024-03-04 12:43 ` rguenth at gcc dot gnu.org
2024-03-31  9:48 ` pinskia at gcc dot gnu.org

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=bug-114164-4-9AtKiK0QhV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).