From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5CA33858C33; Wed, 17 Aug 2022 01:05:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5CA33858C33 From: "hp at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/106594] [13 Regression] sign-extensions no longer merged into addressing mode Date: Wed, 17 Aug 2022 01:05:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hp at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: roger at nextmovesoftware dot com X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2022 01:05:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106594 Hans-Peter Nilsson changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hp at gcc dot gnu.org --- Comment #7 from Hans-Peter Nilsson --- (In reply to Roger Sayle from comment #5) > I'm sure if GCC instead canonicalized to the sign_extend form, that other > targets would show similar asymmetries (it's only when things change that > anyone notices the difference). I'll see if I can come up with a fix over > the weekend. Maybe I'm hallucinating and I'm certainly late to the game, but perhaps a REG_NONNEGATIVE note can be added on the insn for the target register when doing the AND transformation and then combine can be improved to try to rep= lace ZERO_EXTEND with SIGN_EXTEND when seeing this note on the applicable input operand?=