From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4E12C3858C62; Sun, 20 Aug 2023 09:12:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E12C3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692522721; bh=LWnP0xmTJTm0FyYcdqPqB5z58a8fW0Eqyf+eXw51sjg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LyOnZnAq5gWX3YCOMasJV7Q+V5tNCAd4YVO0XyGy66M3k/xh3xfkG4c0Cjekbkraa 5avM5bcLweszxT5xz/TCfquexqq2gmo4dRqwEJPtGEwR0OCVp8U8Md8q6p4j8POnVp 8f7LwAlbOGIf+olOhxPlINV/PO7rSTXcnsX41/ag= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110919] [14 Regression] Dead Code Elimination Regression at -O3 since r14-1691-gbc5a2c2e793 Date: Sun, 20 Aug 2023 09:11:57 +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: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D110919 --- Comment #3 from Andrew Pinski --- The first change we get is threadfull1 where there is an extra jump threadi= ng. And then phiopt2 changes: [local count: 719407024]: if (l_15(D) !=3D 0) goto ; [50.00%] else goto ; [50.00%] into: [local count: 719407024]: _17 =3D l_15(D) =3D=3D 0; _36 =3D (int) _17; And then DOM2 does not do jump threading along: [local count: 628138968]: # iftmp.1_8 =3D PHI <_36(3), 0(5)> As I mentioned in comment #2 we don't see that: _19 =3D _6 =3D=3D iftmp.1_8; _3 =3D iftmp.1_8 ^ 1; _21 =3D (_Bool) _3; _22 =3D _19 & _21; _23 =3D _6 !=3D 0; _5 =3D _22 & _23; is always 0.=