From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2F793858C62; Tue, 11 Jul 2023 23:13:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2F793858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689117182; bh=dUHHSwbXynPeBrNMFmqVtpF2xdMXmT7/uymP3aPXDbo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Dn551Z3g1Thn9rk4MLZJAtuEBRZ3tGTY0G7qU0LtU0vojPvwwvp+aKVDpsztZzu88 Mp1XihvijudCicNdVBtNjdibMoXr4hmgcadkCIaEtDsi90KXgNVQ4KD8PtrhEspUxt nw4HzXJcDq7YOXDaZItSozWUOrwLSQvp7+UcjHQ4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110539] [14 Regression] Dead Code Elimination Regression at since r14-338-g1dd154f6407 Date: Tue, 11 Jul 2023 23:13:02 +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, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: dependson 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=3D110539 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |110293 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > # RANGE [irange] int [0, 1] NONZERO 0x1 > i_7 =3D a.0_1 & 1; >=20 > _17 =3D i_7 !=3D 0; > _12 =3D (int) _17; > if (i_7 =3D=3D _12) Wait that is: i_7 =3D=3D (convert) (i_7 !=3D 0); Which is basically PR 110293. So there is another way of fixing this is simplifying `i_7 =3D=3D (convert) (i_7 !=3D 0)` into `(unsigned_type)i_7 <= =3D 1` and that is always true as `(a.0_1 & 1) <=3D 1` is always true. Let me try fixing PR 110293 as the way of fixing this one instead of the pa= tch which I submitted but has other issues. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110293 [Bug 110293] Some `A CMP (A NEEQ 0)` is not simplified in some cases=