From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0BF93861843; Tue, 16 Jan 2024 14:49:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0BF93861843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705416565; bh=6UXZArDBMrDVRQ9Rs0fEwJPYomzYDM29NomBAzZl7TA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fRCKsp/2SbBZS2pjVJ2HujyTsnIsbCpErpgvd345csLXbKg90vc/DuFTmiLNi+zT+ FKVl5r7o/AibIcLUPSMFVAjHkP+zPH3TEEWpqgS5tKL0RFfEC+jX0WCcAOShwF35p2 OUixS0mLdyPyvMTdJeqQlsm2uCTB6WXMKy9+BV2k= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113374] [14 regression] ICE in find_uses_to_rename_use Date: Tue, 16 Jan 2024 14:49:25 +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=3D113374 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Status|NEW |ASSIGNED --- Comment #9 from Richard Biener --- The code populating alternative exit virtual PHIs simply doesn't handle more than one arg ... /* Now link the alternative exits. */ if (multiple_exits_p)=20=20 { ... SET_PHI_ARG_DEF (l_phi, 0, exit_val); we're losing the original ones doing for (auto exit : loop_exits) {=20=20=20=20=20=20=20 basic_block dest =3D main_loop_exit_block; if (exit !=3D loop_exit) { if (!alt_loop_exit_block) {=20 edge res =3D redirect_edge_and_branch (=20 exit, new_preheader); flush_pending_stmts (res); alt_loop_exit_block =3D split_edge (res); continue; } dest =3D alt_loop_exit_block; } edge e =3D redirect_edge_and_branch (exit, dest); flush_pending_stmts (e); } since that creates a new BB without any virtual PHI.=