From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9FE4C3858D28; Thu, 28 Mar 2024 06:00:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FE4C3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711605627; bh=qKoVeBXPt+TQTfPgaJ9GQF5P9l6KgX0K4VcaHlDQB7E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Bg8Fyaj/Y1NooGyzVry0l/5IxOQFGq5Uw3ctfq0UWuRaXAsiTPuzhjWkiEWFCKRFQ fqlgoVHsdXrVTGRLaDWuBwaK9+URMtCSeuk2IL4M16h2IL4N6WO8apAw7MqxzmQae/ a4sMXAs9lWr/lBAv5ZwD97IKHn3ZvAXCbDldRhOU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114508] Missed optimization of Dead Code Elimination Date: Thu, 28 Mar 2024 06:00:27 +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: enhancement 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: keywords bug_severity 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=3D114508 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Severity|normal |enhancement --- Comment #1 from Andrew Pinski --- It comes down to figuring out that t is `x - 1`. The problem is GCC does not reassociate signed types for overflow reasons.=