From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 196153857817; Tue, 11 Jan 2022 09:23:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 196153857817 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102239] powerpc suboptimal boolean test of contiguous bits Date: Tue, 11 Jan 2022 09:23:01 +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: 11.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: --- 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, 11 Jan 2022 09:23:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102239 --- Comment #12 from CVS Commits --- The master branch has been updated by Xiong Hu Luo : https://gcc.gnu.org/g:19d81fda48f30c4fc11c8912749351acd9159c17 commit r12-6433-g19d81fda48f30c4fc11c8912749351acd9159c17 Author: Xionghu Luo Date: Sun Dec 12 23:17:13 2021 -0600 rs6000: powerpc suboptimal boolean test of contiguous bits [PR102239] Add specialized version to combine two instructions from 9: {r123:CC=3Dcmp(r124:DI&0x600000000,0);clobber scratch;} REG_DEAD r124:DI 10: pc=3D{(r123:CC=3D=3D0)?L15:pc} REG_DEAD r123:CC to: 10: {pc=3D{(r123:DI&0x600000000=3D=3D0)?L15:pc};clobber scratch;clobbe= r %0:CC;} then split2 will split it to one rotate dot instruction (to save one rotate back instruction) as shifted result doesn't matter when comparing to 0 in CCEQmode. Bootstrapped and regression tested pass on Power 8/9/10. gcc/ChangeLog: PR target/102239 * config/rs6000/rs6000-protos.h (rs6000_is_valid_rotate_dot_mas= k): New declare. * config/rs6000/rs6000.c (rs6000_is_valid_rotate_dot_mask): New function. * config/rs6000/rs6000.md (*branch_anddi3_dot): New. gcc/testsuite/ChangeLog: PR target/102239 * gcc.target/powerpc/pr102239.c: New test.=