From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C1693858D1E; Tue, 16 Jan 2024 12:48:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C1693858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705409314; bh=n7SHQPnaQutWstw9tbZypu9gBn0dkxFFLe3C0W+5LH4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VVtE4IBg/xpYsYNwAyKTEW/B1XGrVLJoRexEMsvkTYsNpTiUSepyqRU0D4xMsPn7t bE6Gx2VdrH7gGwUhkwfYZ17Qh9sTxcHo6eI5srLkddzYG/92sQ75KW9mSJLO5JRwly chJMIfxA558Pja1w+FVYMdzCpP1RgE4NN+wkOT2U= From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/112616] [11/12/13/14 Regression] wrong code at -O{s,2,3} on x86_64-linux-gnu since r10-3311 Date: Tue, 16 Jan 2024 12:48:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112616 --- Comment #6 from Martin Jambor --- (In reply to Andrew Pinski from comment #1) > # q_11 =3D PHI <0B(2), removed_return.14_14(D)(4), > removed_return.14_14(D)(3)> > _12 =3D *q_11; >=20 >=20 > WTF???? Well, _12 is not used anywhere, so the code expects the entire load to be D= CEd. But it gets optimized to=20 _2 =3D MEM[(int *)0B];=20 before DCE sees it and then even if _2 is never used anywhere, apparently t= he statement is kept there as an intended trap (I guess). I have adjusted my patch to make DCE for removed returnd part of IPA edge redirection so that it does not have compare-debug problems and submitted it for review in: https://inbox.sourceware.org/gcc-patches/ri6cyu1e9kw.fsf@/T/= #u=