From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AE46B3858D28; Tue, 14 Dec 2021 08:50:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AE46B3858D28 From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103702] [12 Regression] ICE in update_target_cost_per_stmt, at config/rs6000/rs6000.c:5457 Date: Tue, 14 Dec 2021 08:50:50 +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: linkw at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status cc everconfirmed cf_reconfirmed_on 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, 14 Dec 2021 08:50:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103702 Kewen Lin changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |linkw at gcc dot gn= u.org Status|UNCONFIRMED |ASSIGNED CC| |bergner at gcc dot gnu.org, | |linkw at gcc dot gnu.org, | |segher at gcc dot gnu.org, | |wschmidt at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed| |2021-12-14 --- Comment #1 from Kewen Lin --- Confirmed. Thanks for reporting, it failed at 5457 gcc_assert (nunits > 1); the given nunits is 1. The assertion was introduced in r12-5589, which aims to ensure we only cons= ider tweaking the cost for the vectype which has more than 1 elements (units). This issue with Power6 32bit shows that when the preferred vector mode is SImode, vectorizer will use vector(1) int as vectype and tries to vectorize scalar int load as scalar_load and further vector construction. One fix would be to bypass this kind of case with 1 nunit fed into vector construction instead of one assertion.=