From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2F8153858404; Tue, 10 Oct 2023 11:52:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F8153858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696938743; bh=6vgH5H/ga+wEhU3IBtFpWWRNDAs3w7rLYqj3x/ZE5mc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=azyB2+0uFDRkI9RgN/4m2Q7qGJ72k7pJfnx6oqOnCRabXtHw7k34dRE8DCc5UUDRA yN+w7w85PNGllQP2J2CpR0gSTDbA2WBlP5xtImgkNcHUMi0ZiOjj/Q1jqE/ax5Oaoo KNWhXX2/eYCJFyM/55xOzE0SA7QL3Ho8rP1jX6u4= From: "rguenther at suse dot de" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: prathamesh3492 at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111754 --- Comment #4 from 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=3D111754 >=20 > --- 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: >=20 > 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, c= onst > vec_perm_indices &sel) > return NULL_TREE; >=20 > if (TREE_CODE (arg0) =3D=3D VECTOR_CST > - && TREE_CODE (arg1) =3D=3D VECTOR_CST) > + && TREE_CODE (arg1) =3D=3D 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.=