From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DC9639730DC; Tue, 27 Jul 2021 08:52:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DC9639730DC From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/78103] Failure to optimize with __builtin_clzl Date: Tue, 27 Jul 2021 08:52:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 6.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: attachments.isobsolete attachments.created 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, 27 Jul 2021 08:52:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D78103 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51204|0 |1 is obsolete| | --- Comment #16 from Jakub Jelinek --- Created attachment 51209 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D51209&action=3Dedit gcc12-pr78103.patch Updated patch. This one fixes the reuse of a pseudo you've mentioned above, and fixes gcc.target/i386/pr101175.c regression the patch reintroduced by adding !TARGET_LZCNT conditions to the two new define_insns. Nothing changes for combine though, I think it really would be nice if it c= ould either change newly added pseudos from combine_split_insns by i2dest if possible, or better handle new pseudos from both combine_split_insns and wh= en for find_split_point i2dest can't be resued with creating LOG_LINKS. I guess I can work around this by using define_insn_and_split instead of a combiner splitter, but combine splitters are cleaner...=