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/114231] [12/13/14 regression] ICE when building libjxl
Date: Tue, 05 Mar 2024 09:54:24 +0000	[thread overview]
Message-ID: <bug-114231-4-DluYzKrGp3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114231-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the immediate reason is that between analysis and transform whether we
consider the shift vectorizable changes.  That's because we code generated
a live lane which ended up changing operands in stmts we will vectorize
(there's some odd broken handling there I think).  That's because we
match up the scalar from the SLP node with the scalar in the scalar GIMPLE
IL (which changed) here:

  stmt_vec_info op1_def_stmt_info;
  slp_tree slp_op1;
  if (!vect_is_simple_use (vinfo, stmt_info, slp_node, 1, &op1, &slp_op1,
                           &dt[1], &op1_vectype, &op1_def_stmt_info))
...
          FOR_EACH_VEC_ELT (stmts, k, slpstmt_info)
            {
              gassign *slpstmt = as_a <gassign *> (slpstmt_info->stmt);
              if (!operand_equal_p (gimple_assign_rhs2 (slpstmt), op1, 0))
                scalar_shift_arg = false;
            } 

which is a bit fragile.

But the underlying issue seems to be the live lane stuff.

Ah, and that's because we do the reduction discovery on the original
scalar stmt while live lane extraction honors patterns when checking
whether the stmt is vectorized ...

I have a patch, not sure how big the fallout might be though.

  parent reply	other threads:[~2024-03-05  9:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  5:11 [Bug tree-optimization/114231] New: [14 " sjames at gcc dot gnu.org
2024-03-05  5:11 ` [Bug tree-optimization/114231] " sjames at gcc dot gnu.org
2024-03-05  5:15 ` pinskia at gcc dot gnu.org
2024-03-05  5:16 ` sjames at gcc dot gnu.org
2024-03-05  5:22 ` pinskia at gcc dot gnu.org
2024-03-05  5:33 ` pinskia at gcc dot gnu.org
2024-03-05  5:41 ` pinskia at gcc dot gnu.org
2024-03-05  5:49 ` pinskia at gcc dot gnu.org
2024-03-05  5:54 ` [Bug tree-optimization/114231] [12/13/14 " pinskia at gcc dot gnu.org
2024-03-05  6:11 ` pinskia at gcc dot gnu.org
2024-03-05  6:20 ` pinskia at gcc dot gnu.org
2024-03-05  7:31 ` jakub at gcc dot gnu.org
2024-03-05  8:56 ` rguenth at gcc dot gnu.org
2024-03-05  9:54 ` rguenth at gcc dot gnu.org [this message]
2024-03-05 10:47 ` cvs-commit at gcc dot gnu.org
2024-03-05 10:53 ` [Bug tree-optimization/114231] [12/13 Regression] " rguenth at gcc dot gnu.org
2024-03-21 13:54 ` cvs-commit at gcc dot gnu.org
2024-03-21 13:55 ` [Bug tree-optimization/114231] [12 " rguenth at gcc dot gnu.org
2024-05-16  9:56 ` cvs-commit at gcc dot gnu.org
2024-05-16 10:39 ` rguenth 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-114231-4-DluYzKrGp3@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).