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 middle-end/111754] [14 Regression] ICE: in decompose, at rtl.h:2313 at -O
Date: Tue, 10 Oct 2023 13:38:37 +0000	[thread overview]
Message-ID: <bug-111754-4-5gpv01nQxj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111754-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
It seems we have VECTOR_CST_NELTS_PER_PATTERN ({ 9.0e+0, 0.0, 0.0, 0.0 })
2 and VECTOR_CST_NPATTERNS == 1.  And the selector { 1, 0, 1, 2 } has
npatterns == 1 and nelts-per-pattern == 3.

  /* (1) If SEL is a suitable mask as determined by
     valid_mask_for_fold_vec_perm_cst_p, then:
     res_npatterns = max of npatterns between ARG0, ARG1, and SEL
     res_nelts_per_pattern = max of nelts_per_pattern between
                             ARG0, ARG1 and SEL.
     (2) If SEL is not a suitable mask, and TYPE is VLS then:
     res_npatterns = nelts in result vector.
     res_nelts_per_pattern = 1.
     This exception is made so that VLS ARG0, ARG1 and SEL work as before.  */
  if (valid_mask_for_fold_vec_perm_cst_p (arg0, arg1, sel, reason))
    {
      res_npatterns
        = std::max (VECTOR_CST_NPATTERNS (arg0),
                    std::max (VECTOR_CST_NPATTERNS (arg1),
                              sel.encoding ().npatterns ()));

      res_nelts_per_pattern
        = std::max (VECTOR_CST_NELTS_PER_PATTERN (arg0),
                    std::max (VECTOR_CST_NELTS_PER_PATTERN (arg1),
                              sel.encoding ().nelts_per_pattern ()));

      res_nelts = res_npatterns * res_nelts_per_pattern;

this seems to be a case that doesn't fit, so the fix needs to be to
valid_mask_for_fold_vec_perm_cst_p which really looks a bit
unwieldly.

An assert that res_nelts is power-of-two would be nice to add.

  parent reply	other threads:[~2023-10-10 13:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10  5:15 [Bug rtl-optimization/111754] New: " zsojka at seznam dot cz
2023-10-10  9:25 ` [Bug middle-end/111754] " rguenth at gcc dot gnu.org
2023-10-10  9:38 ` prathamesh3492 at gcc dot gnu.org
2023-10-10 11:41 ` prathamesh3492 at gcc dot gnu.org
2023-10-10 11:52 ` rguenther at suse dot de
2023-10-10 13:38 ` rguenth at gcc dot gnu.org [this message]
2023-10-10 14:07 ` prathamesh3492 at gcc dot gnu.org
2023-10-10 14:37 ` prathamesh3492 at gcc dot gnu.org
2023-10-10 15:45 ` rguenther at suse dot de
2023-11-05 22:00 ` pinskia at gcc dot gnu.org
2023-11-05 22:19 ` rsandifo at gcc dot gnu.org
2023-11-11  1:37 ` sjames at gcc dot gnu.org
2023-11-27 17:12 ` cvs-commit at gcc dot gnu.org
2023-11-27 17:15 ` prathamesh3492 at gcc dot gnu.org
2023-11-28  9:18 ` cvs-commit at gcc dot gnu.org
2023-11-28 15:40 ` prathamesh3492 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-111754-4-5gpv01nQxj@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).