From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C1A8538425B2; Tue, 10 May 2022 08:18:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1A8538425B2 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() Date: Tue, 10 May 2022 08:18:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2022 08:18:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100887 --- Comment #15 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:74b7d769e3cc1b18509103a6ac6466713858a376 commit r10-10617-g74b7d769e3cc1b18509103a6ac6466713858a376 Author: Jakub Jelinek Date: Mon Jun 7 09:28:31 2021 +0200 fold-const: Fix up fold_read_from_vector [PR100887] The callers of fold_read_from_vector expect that the index they pass is an index of an element in the vector and the function does that most of= the time. But we allow CONSTRUCTORs with VECTOR_TYPE to have VECTOR_TYPE elements and in that case every CONSTRUCTOR element represents not just= one index (with the exception of V1 vectors), but multiple. So returning zero vector if i >=3D CONSTRUCTOR_NELTS or returning some CONSTRUCTOR_ELT's value might not be what the callers expect. Fixed by punting if the first element has vector type. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? In theory we could instead recurse (and assert that for CONSTRUCTORs of vector elements we have always all elements specified like tree-cfg.c verifies?) after adjusting the index appropriately. 2021-06-07 Jakub Jelinek PR target/100887 * fold-const.c (fold_read_from_vector): Return NULL if trying to read from a CONSTRUCTOR with vector type elements. (cherry picked from commit e1521b170b44be5cd5d36a98b6b760457b68f566)=