From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7BA963870C09; Wed, 26 Jun 2024 03:18:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BA963870C09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719371882; bh=1/AIIMTRwjrXAFu2iK0I6orKyY7SUC2OrEH8nzXPY2g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lwYmB1FqvFy/br7ALNOKx5hTMDXV0X87FgBHhXs36QzBrHR6ORbKwiMR8PpGcyBAZ nA7w5VtxTLKlKLnN+TXuATPivsC3SBro3ywCpbBGlHo2GDsbrDqqRdUb/dfs+KNiaw YcluGa4rtJbM6NXUfE74Lub0mjFkTHfa2rP8qTGY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115636] Missing optimzation: fold ` (w << (unsigned int)((flag ? a : b) - 32768))` to ` flag ? w << (unsigned int)(a - 32768) : 0 ` Date: Wed, 26 Jun 2024 03:18:01 +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: 15.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status 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=3D115636 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org Status|NEW |ASSIGNED --- Comment #2 from Andrew Pinski --- Going to implement something for isolate-paths. It might not be exactly what was expecting here due it might be using a trap rather than 0.=20 > According to the behavior of gcc Note this is statement is not exactly "correct" it is just the behavior for= gcc currently for this undefined behavior.=20 Note I have a straw poll going on which behavior we should do (maybe even by default): https://gcc.gnu.org/pipermail/gcc/2024-June/244213.html=