public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <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 11:52:23 +0000	[thread overview]
Message-ID: <bug-111754-4-TjAzKGE2CZ@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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 10 Oct 2023, prathamesh3492 at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111754
> 
> --- Comment #3 from prathamesh3492 at gcc dot gnu.org ---
> The issue is that we only support integral vector types in fold_vec_perm_cst,
> but fail to check for the same before calling it from fold_vec_perm.
> The following tweak fixes the ICE:
> 
> diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc
> index 4f8561509ff..a29a8af6d2f 100644
> --- a/gcc/fold-const.cc
> +++ b/gcc/fold-const.cc
> @@ -10801,7 +10801,8 @@ fold_vec_perm (tree type, tree arg0, tree arg1, const
> vec_perm_indices &sel)
>      return NULL_TREE;
> 
>    if (TREE_CODE (arg0) == VECTOR_CST
> -      && TREE_CODE (arg1) == VECTOR_CST)
> +      && TREE_CODE (arg1) == VECTOR_CST
> +      && INTEGRAL_TYPE_P (TREE_TYPE (type)))
>      return fold_vec_perm_cst (type, arg0, arg1, sel);

Huh, that looks wrong.  I fail to see how the element type matters
at all.

  parent reply	other threads:[~2023-10-10 11:52 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 [this message]
2023-10-10 13:38 ` rguenth at gcc dot gnu.org
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-TjAzKGE2CZ@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).