From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F20EE3858D20; Tue, 16 Jan 2024 13:57:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F20EE3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705413457; bh=tyzQ4ZONZVaKFcywtgXqcq+m2qSpZbbRAeKThYRl5Gw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Veu/NIvUFeYLgUqf8+Ysjq1ls+oJLhA151Icr5YLhTYHVV633VNtLi+OT57EKHoet pgieEC7QGZhyjQuMXedWJ1CVi5R5mHrDOFMHsYz91yWIUEXGsk43CMkqXigYnyXg+X Em9bJ+S7kOwxhNLC/s0U/AdvY1sIpJd6pQxvP3Fw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822 Date: Tue, 16 Jan 2024 13:57:37 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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=3D113373 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Status|NEW |ASSIGNED --- Comment #7 from Richard Biener --- All good after vect_do_peeling. It's wrecked by vect_create_epilog_for_reduction here: scalar_result =3D scalar_results[k]; FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, orig_name) { FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter) SET_USE (use_p, scalar_result); update_stmt (use_stmt); we have two reduction epilogues, one for the early and one for the late exit but we mismatch the scalar use to replace. We're also picking up a reduction that's only live on one edge on the other (but that doesn't seem to result in a problem here). It also seems we're doing epilogue code generation before creating some exit PHIs required for that - vect_do_peeling fails to do that. We can try to hack around that a bit, but there's more issues with this testcase, like we generate useless epilogues - it seems we should identify the scalar exit PHI to transform when calling epilogue generation for a specific edge and skip if there isn't one.=