From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 773CB3858D28; Fri, 4 Feb 2022 21:17:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 773CB3858D28 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97747] [9/10/11/12 Regression] missed combine opt with logical ops after zero extended load Date: Fri, 04 Feb 2022 21:17:59 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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: cf_reconfirmed_on everconfirmed cf_known_to_fail short_desc cf_known_to_work bug_status component 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: Fri, 04 Feb 2022 21:17:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97747 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-02-04 Ever confirmed|0 |1 Known to fail| |8.2.0 Summary|missed combine opt with |[9/10/11/12 Regression] |logical ops after zero |missed combine opt with |extended load |logical ops after zero | |extended load Known to work| |7.5.0 Status|UNCONFIRMED |ASSIGNED Component|rtl-optimization |tree-optimization --- Comment #1 from Andrew Pinski --- Mine for GCC 13, bitfield lowering. Note the store merging pass also messes up and creates: _5 =3D _4 & 250; _6 =3D _5 | 5; Which can be optimized to just: _6 =3D _4 | 5; I might look at store merging first. Note I think this might be a regression in code generation (store merging caused the regressions). GCC 7.5.0 produced: ldr r2, .L3 ldrb r3, [r2] @ zero_extendqisi2 orr r3, r3, #5 strb r3, [r2] bx lr While GCC 8.2.0 produced: ldr r2, .L3 ldrb r3, [r2] @ zero_extendqisi2 bic r3, r3, #5 orr r3, r3, #5 strb r3, [r2] bx lr=