From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C52BD3847818; Sun, 1 Aug 2021 20:33:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C52BD3847818 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/78103] Failure to optimize with __builtin_clzl Date: Sun, 01 Aug 2021 20:33:13 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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: Sun, 01 Aug 2021 20:33:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D78103 --- Comment #24 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:6f0c43e97825ee54e3779afbedcd0def12443001 commit r12-2656-g6f0c43e97825ee54e3779afbedcd0def12443001 Author: H.J. Lu Date: Sun Aug 1 09:55:33 2021 -0700 i386: Improve SImode constant - __builtin_clzll for -mno-lzcnt Add a zero_extend patten for bsr_rex64_1 and use it to split SImode constant - __builtin_clzll to avoid unncessary zero_extend. gcc/ PR target/78103 * config/i386/i386.md (bsr_rex64_1_zext): New. (combine splitter for constant - clzll): Replace gen_bsr_rex64_1 with gen_bsr_rex64_1_zext. gcc/testsuite/ PR target/78103 * gcc.target/i386/pr78103-2.c: Also scan incl. * gcc.target/i386/pr78103-3.c: Scan leal|addl|incl for x32. Al= so scan incq.=