From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 08B2F3858D39; Tue, 2 May 2023 05:06:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08B2F3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683003964; bh=1wtKaoLdbGRjeZ9Kwl5+fE29xwA48zWtLBnFq3A6ww0=; h=From:To:Subject:Date:From; b=wjacUDkCYJBMrQAU696D1pTE6OrCKoXEeMcZCXobQNbUoHqU+/y14j4U4Ird3R1sV RmzPySKDHmb4oyBJS+or5P9s++JMjND0Vkueb8I/SVZ0o8BqPJXYJVKC5PpflTNnKP cos7iI5CsykKaZAdroORrV/AAiAh9nqHp2ysNf7c= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109691] New: Takes until forwprop2 to remove !a sometimes Date: Tue, 02 May 2023 05:06:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: internal-improvement, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D109691 Bug ID: 109691 Summary: Takes until forwprop2 to remove !a sometimes Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: internal-improvement, missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` int f(_Bool c, int a, int b) { _Bool d =3D c; d =3D !d; if (d !=3D 0) return a; return b; } ``` It takes until forwprop2 now to remove all of the code before the condition= al. In GCC 4.9.0, we used to do it almost all the way in forwprop1; with just o= ne assignment added. I noticed this while looking into PR 67628 but it is not exactly an issue t= here so filing it seperately.=