From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46A7C3858298; Fri, 27 Oct 2023 16:02:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46A7C3858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698422574; bh=6Ng26gSpmRoJ4oAc+9fjLeX0Ps8UqYGj9WSQkgUVnak=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WklUC6lxA41oxlJTSdSIiOd8yrnSFylzPghaKe4HAcChhOHxlPOuaF3ys0u0NF4Z8 j+ftKZjw8savNrUAFGF3Srx74Bvpz9Da39G+D2pkr1dJ7vWXl8Z4q30ttGXlNToaLc ChopGNa8VIoRuyFSEaj09A//LcgQ90SdhVsOMkZA= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111950] [14 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.cc:250 since r14-4786-gd118738e71c Date: Fri, 27 Oct 2023 16:02:53 +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, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: tnfchris at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111950 --- Comment #4 from Tamar Christina --- > turning c_I_lsm.18_38 into a fully invariant reduction def which likely i= sn't supported - we had bugs here in the past with not relevant but live stmts. But if-conversion also performs the (now valid) hoisting, this is maybe why it was triggered by that rev. Ah yeah this is something different from what I just fixed. Indeed, this causes find_guard_arg to no longer find the tie to the original PHI. It's trying to match=20 # c_I_lsm.18_60 =3D PHI and # c_I_lsm.18_79 =3D PHI after it adds the edge. Normally loop invariant values are left in the the guard block for this. In this case we've left # c_I_lsm.18_65 =3D PHI Normally instead of=20 # c_I_lsm.18_60 =3D PHI we'd find c_I_lsm.18_65 here. The value is as you mentioned loop invariant. but since c_I_lsm.18_38 is no longer a PHI node the link was broken. I don't think we can really recover this in the vectorizer can we? Would the proper fix perhaps be to have ifconvert fully convert things? It seems to have missed that # c_I_lsm.18_60 =3D PHI is just c_I_lsm.18_60 =3D _58 ? 1 : a.3_23; that would prevent the PHI node confusion=