From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ACE82385842D; Thu, 13 Jul 2023 14:55:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACE82385842D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689260119; bh=i6lnXBnwsTzrskRk5Rj+PGEcjLVQwvq55yqOhMZ//M8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Dyv/q3TSwzV4yc5E3yp30DnIsPFOdWai7AiBn58BZEhcW+s8GOXwxZfkz2Zl0vZpw bQdHqHlfSoTyxUtOzfGZRVJqlq7Nbk296193m24joqpixkvrZ7ySwTrEgosGE/9u7P Z8UfFC6HeAW7shMI2KOXDxs2GaUnBUN7SDa07WOo= From: "cvs-commit 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: Thu, 13 Jul 2023 14:55:18 +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: cvs-commit 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: 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 --- Comment #10 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:285c9d042e90a7425b37697edc9ec93a1b03b486 commit r14-2501-g285c9d042e90a7425b37697edc9ec93a1b03b486 Author: Andrew Pinski Date: Wed Jul 12 00:33:14 2023 -0700 Fix part of PR 110293: `A NEEQ (A NEEQ CST)` part This fixes part of PR 110293, for the outer comparison case being `!=3D` or `=3D=3D`. In turn PR 110539 is able to be optimized again as the if statement for `(a&1) =3D=3D ((a & 1) !=3D 0)` gets opti= mized to `false` early enough to allow FRE/DOM to do a CSE for memory store/l= oad. OK? Bootstrapped and tested on x86_64-linux with no regressions. gcc/ChangeLog: PR tree-optimization/110293 PR tree-optimization/110539 * match.pd: Expand the `x !=3D (typeof x)(x =3D=3D 0)` pattern to handle where the inner and outer comparsions are either `!=3D` or `=3D=3D` and handle other constants than 0. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr110293-1.c: New test. * gcc.dg/tree-ssa/pr110539-1.c: New test. * gcc.dg/tree-ssa/pr110539-2.c: New test. * gcc.dg/tree-ssa/pr110539-3.c: New test. * gcc.dg/tree-ssa/pr110539-4.c: New test.=