From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D0A0E3858438; Mon, 22 Nov 2021 18:17:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0A0E3858438 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103345] missed optimization: add/xor individual bytes to form a word Date: Mon, 22 Nov 2021 18:17:31 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: --- 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: Mon, 22 Nov 2021 18:17:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103345 --- Comment #3 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:a944b5dec3adb28ed199234d2116145ca9010d6a commit r12-5453-ga944b5dec3adb28ed199234d2116145ca9010d6a Author: Roger Sayle Date: Mon Nov 22 18:15:36 2021 +0000 tree-optimization/103345: Improved load merging. This patch implements PR tree-optimization/103345 to merge adjacent loads when combined with addition or bitwise xor. The current code in gimple-ssa-store-merging.c's find_bswap_or_nop alreay handles ior, so that all that's required is to treat PLUS_EXPR and BIT_XOR_EXPR in the same way at BIT_IOR_EXPR. Many thanks to Andrew Pinski for pointing out that this also resolves PR target/98953. 2021-11-22 Roger Sayle gcc/ChangeLog PR tree-optimization/98953 PR tree-optimization/103345 * gimple-ssa-store-merging.c (find_bswap_or_nop_1): Handle BIT_XOR_EXPR and PLUS_EXPR the same as BIT_IOR_EXPR. (pass_optimize_bswap::execute): Likewise. gcc/testsuite/ChangeLog PR tree-optimization/98953 PR tree-optimization/103345 * gcc.dg/tree-ssa/pr98953.c: New test case. * gcc.dg/tree-ssa/pr103345.c: New test case.=