From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4FBEC3858D28; Tue, 17 Jan 2023 09:16:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4FBEC3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673946988; bh=PXoRTX1aBX24O7/xlozvDEbkJJOsngYsM3Si28088QU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UbyQ63TA5SOrnve5oWNLgiOrC69QgGdZRP6LE4a6IbfTV09puli5q+REJq4s1Ye2Q eluKf+4dybgoUFnRUJO0gldqfYSLaW5LRfFxFvHkqB8PGPPUfbC8GZdNednOqo7Z/w NB/R995FiURrZI6jRZm6WAKw6fbTKYcnLLlj2qxw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106075] Wrong DSE with -fnon-call-exceptions Date: Tue, 17 Jan 2023 09:16:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: EH, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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=3D106075 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org --- Comment #7 from Richard Biener --- I think the IL is somewhat buggy in the control transfer instruction not be= ing indicated as reading from global memory. I think it should act similar to a GIMPLE_RETURN where we now force a VUSE. There's a related bug about GIMPLE_RESX not having virtual operands and the issue DSE has with this. Now, that would mean that for the original testcase a fix would be simply to consider all throwing points uses (for global memory). I have a patch to do that, leaving the IL issue (the throwing division case and RESX) unfixed. Note that RTL DSE happily removes the first store as well, so I had to fix that as well.=