From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 387C53858D39; Tue, 10 Oct 2023 13:38:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 387C53858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696945118; bh=RaiwyTBHBPAUurmqcq4nMZQy3saaRs8KatnuIn6vVKo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qSXsU9VyEJR8tJMxp4WqzSOalWYly3EtvCMBEry+H0fZB3f1gT7b65bAjhBOgmV+W wDhJ1oWS8TVpM0Ejg2uThAmBbhfoPW4xRiCY9Vy1NINTgzfkG8UG++iQMsRNPaYFCL HpRDEpYDaCFbNp3ubuCjBkSQ8rDSHep0lxYMQ+6U= From: "rguenth at gcc dot 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 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: rguenth at gcc dot gnu.org 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: cc 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 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #5 from Richard Biener --- It seems we have VECTOR_CST_NELTS_PER_PATTERN ({ 9.0e+0, 0.0, 0.0, 0.0 }) 2 and VECTOR_CST_NPATTERNS =3D=3D 1. And the selector { 1, 0, 1, 2 } has npatterns =3D=3D 1 and nelts-per-pattern =3D=3D 3. /* (1) If SEL is a suitable mask as determined by valid_mask_for_fold_vec_perm_cst_p, then: res_npatterns =3D max of npatterns between ARG0, ARG1, and SEL res_nelts_per_pattern =3D 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 =3D nelts in result vector. res_nelts_per_pattern =3D 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 =3D std::max (VECTOR_CST_NPATTERNS (arg0), std::max (VECTOR_CST_NPATTERNS (arg1), sel.encoding ().npatterns ())); res_nelts_per_pattern =3D std::max (VECTOR_CST_NELTS_PER_PATTERN (arg0), std::max (VECTOR_CST_NELTS_PER_PATTERN (arg1), sel.encoding ().nelts_per_pattern ())); res_nelts =3D 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.=