From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 148F33858D28; Tue, 31 Jan 2023 04:33:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 148F33858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675139625; bh=n0rxN637X55/LhtRBLOYnGJw6e/Cz+h17uRnOBtTtWU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cLKpVKvYr30ID9NzChy4uRnxTBUKLvnTzY8le0MJjdgxdlDMAdt9ALXuXQ7qy+dT9 JNJg6f1rvs+yAMN4dvaO16NwUf+xzLjnKgNFffpyjNC63PVj+FJov9XJSOvx+cv+8o w6K9ljxvonub5AItdcIJdN8GWflY9x8FluPb1uU4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108354] [13 Regression] Dead Code Elimination Regression at -O2 since r13-89-gb3e98eb3396e16 Date: Tue, 31 Jan 2023 04:33:44 +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: 13.0 X-Bugzilla-Keywords: missed-optimization 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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=3D108354 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org Status|NEW |ASSIGNED Depends on| |96921 --- Comment #1 from Andrew Pinski --- Looks like: _4 =3D (int) _2; ... i.1_15 =3D (unsigned short) _2; _16 =3D 1 - i.1_15; _6 =3D (int) _16; ... _8 =3D _4 | _6; Simplify to just _4 =3D (int) _2; ... _t =3D _2 ^ 1; _6 =3D (int)_t; ... _8 =3D _4 | _6; Which then simplifies down to: _8 =3D 1; (because (_2 ^ 1) | (_2) =3D=3D 1) Which then would be optimized. Let me look. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96921 [Bug 96921] Failure to optimize combined boolean not patterns=