From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 049393857B8E; Wed, 15 Mar 2023 09:47:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 049393857B8E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678873669; bh=NFcnZIW4KTfbqAAZypZmZ+rfsl1C7epjwzkWjWznQv0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EVqLFfQK/OFm/O5QM8/CYmsZS7NMykY+k/qyftBlS1dDS7NYu+Y6KBxlf1a1ZpaSO evItSTeSUHCOmazhKvJDamDYUhTWYrcLC/jKYRMGMe+LCewwBLytWbUBuwN1UsgKgd DN254fE31zVQCywWbmf9vYIUmFvVetJOD7X+sBOw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107451] [11/12 Regression] Segmentation fault with vectorized code since r11-6434 Date: Wed, 15 Mar 2023 09:47:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.3.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D107451 --- Comment #13 from CVS Commits --- The releases/gcc-12 branch has been updated by Richard Biener : https://gcc.gnu.org/g:c722c6b061a5e909267eae53ffe5910fbe0a7d5e commit r12-9255-gc722c6b061a5e909267eae53ffe5910fbe0a7d5e Author: Richard Biener Date: Thu Dec 22 09:36:17 2022 +0100 tree-optimization/107451 - SLP load vectorization issue When vectorizing SLP loads with permutations we can access excess elements when the load vector type is bigger than the group size and the vectorization factor covers less groups than necessary to fill it. Since we know the code will only access up to group_size * VF elements in the unpermuted vector we can simply fill the rest of the vector with whatever we want. For simplicity this patch chooses to repeat the last group. PR tree-optimization/107451 * tree-vect-stmts.cc (vectorizable_load): Avoid loading SLP group members from group numbers in excess of the vectorization factor. * gcc.dg/torture/pr107451.c: New testcase. (cherry picked from commit 7b2cf5041460859ca4f58e5da1308b7ef9129d8b)=