From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C4E83858284; Tue, 9 Jan 2024 08:43:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C4E83858284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704789800; bh=38jjr3OC4yC5sncniVHgkQCRBCLsJzUd9Vj/FciWXTg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Mer24YDTxvQsEvC/UjbY2mVBeSiRhHYvOLchEg0bqIHk8Ecyior1auyUwR/xait/x rC5EqS/B+1/bJC7KoXJ2SZAqH3Z77UYDkzas5ycFnL7zv6mi+l/oRbUoIB7fLrTx8p XCJN9c/P/ff0DgFqt6RNWCwsWytAnJ2Y7VYSpMGg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113265] [Regression] Missed optimization for redundancy computation elimination may be due to constant propagation about 0 too late Date: Tue, 09 Jan 2024 08:43:19 +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: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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=3D113265 --- Comment #3 from Andrew Pinski --- Thinking on how to solve this would be have a match which says maybe_negative_expr which matches - and minus expressions and then have an external function which checks if -@0 matches @1 . Though that would be gcc 15 material and should be replacing where we alrea= dy match (a-b) and (b-a) manually and that might simplify things too ...=