From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B232E385743D; Thu, 9 Sep 2021 19:40:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B232E385743D From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102239] powerpc suboptimal boolean test of contiguous bits Date: Thu, 09 Sep 2021 19:40:54 +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: segher 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: cf_reconfirmed_on everconfirmed bug_status 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: Thu, 09 Sep 2021 19:40:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102239 Segher Boessenkool changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-09-09 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Segher Boessenkool --- Confirmed. So the relevant insn (parallel [(set (reg:CC 123) (compare:CC (and:DI (reg:DI 124) (const_int 25769803776 [0x600000000])) (const_int 0 [0]))) (clobber (scratch:DI))]) is matched by *and3_2insn but not by any pattern that ends up as just one insn. Not *and3_mask_dot, because that doesn't do a shift first, is just an AND and there are no machine insns to do that; but there is no pattern for what we can do. *rotl3_mask_dot cannot do this either; the base and the dot2 of that cannot be done, they return a shifted result, but that doesn't matter for comparing it to 0. So we should add a specialised version.=