From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EFF84384A40A; Wed, 27 Jan 2021 08:54:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFF84384A40A From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98845] [8/9/10/11 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 23 which are marked as MUST COALESCE.) since r6-528-g465770e43996a132 Date: Wed, 27 Jan 2021 08:54:11 +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.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: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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 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: Wed, 27 Jan 2021 08:54:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98845 --- Comment #4 from Richard Biener --- +find_duplicates: duplicate of +Removing basic block 20 @@ -170,7 +180,7 @@ [local count: 3614577]: goto ; [100.00%] - [local count: 7016531]: + [local count: 8742389]: p_218_24 =3D p_217_23(D)(ab); p_217_32 =3D p_217_23(D)(ab); goto ; [100.00%] @@ -213,12 +223,10 @@ if (p_218_8 !=3D 0) goto ; [83.51%] else - goto ; [16.49%] - - [local count: 1725858]: + goto ; [16.49%] [local count: 12356965]: - # _9 =3D PHI <1(17), 0(20), 0(6)> + # _9 =3D PHI <1(17), 0(6)> return _9; but that makes _23(D) live on the path from bb 12 to bb 13. The issue here is that _23 and _32 are unused but their RHS is still accounted for during LIVE problem solving but they are ignored during VN and by tail-merging which just looks at BB side-effects. So the testcase is really an artifact of -fno-tree-dce. One could argue that tail merging should treat a use of abnormals as side-effect but I think that won't play well with its structure.=