From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 065953945C3A; Tue, 13 Apr 2021 15:34:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 065953945C3A From: "luc.vanoostenryck at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100056] [9/10/11 Regression] orr + lsl vs. [us]bfiz Date: Tue, 13 Apr 2021 15:34:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: luc.vanoostenryck at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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 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: Tue, 13 Apr 2021 15:34:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100056 --- Comment #4 from Luc Van Oostenryck = --- (In reply to Jakub Jelinek from comment #3) > Created attachment 50583 [details] > gcc11-pr100056.patch >=20 > Untested fix. Mmmm, that's working fine for the cases I had but not in more general cases. I think that the constraint on the AND may be too tight. For example, changing things slightly to have a smaller mask: int or_lsl_u3(unsigned i) { i &=3D 7; return i | (i << 11); } still gives: or_lsl_u3: and w1, w0, 7 ubfiz w0, w0, 11, 3 orr w0, w0, w1 ret while GCC8 gave the expected: or_lsl_u3: and w0, w0, 7 orr w0, w0, w0, lsl 11 ret In fact, I would tend to think that the AND part should be removed from your split pattern (some kind of zero-extension seems to be needed to reproduce the problem but that's all).=