From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8BA43858D28; Thu, 28 Mar 2024 17:47:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8BA43858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711648071; bh=F3XYiaHD1OaUT+o+Ak1ZXTK37adU+t7Mjpt5+a2d6gU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CnIrzmDjoN4byhfmVQBxut5zN0ISMNrR86JAimNJC6zYDFTC/5eI3UM1Dk60NTj4w Pwoenoxya2GloQRIP6yUV5qkvaJ7J2qJRj8LCTbjzmEsfMHCDk/+FzO6T9sI7/3SEq CJx8oZWeiE5dXVBRdiqBNLTim5caXfvIMS+28YRU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112723] [11/12/13/14 Regression] Missed optimization for invariants 'c+c' when c += -2147483647-1 and c is a global variable Date: Thu, 28 Mar 2024 17:47:51 +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, TREE 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: 11.5 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=3D112723 --- Comment #5 from Andrew Pinski --- (In reply to Richard Biener from comment #2) >=20 > So what's missing is a simplification pattern that ignores ops that only > alter > bits that are dont-care in a later operation. That fits the backprop pass > best, not special simplification patterns. I think this belongs in gimple-ssa-strength-reduction like it was done for = GCC 7.1.0/7.2.0 until that fix went in which was done for all types rather than just overflow types.=