From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2F22385800A; Thu, 31 Dec 2020 10:10:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2F22385800A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz Date: Thu, 31 Dec 2020 10:10:11 +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: 10.0 X-Bugzilla-Keywords: easyhack, 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: Thu, 31 Dec 2020 10:10:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94802 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:d2eb616a0f7bea78164912aa438c29fe1ef5774a commit r11-6378-gd2eb616a0f7bea78164912aa438c29fe1ef5774a Author: Jakub Jelinek Date: Thu Dec 31 11:09:26 2020 +0100 match.pd: Add clz(X) =3D=3D 0 -> (int)X < 0 etc. simpifications [PR9480= 2] The following patch adds some clz simplifications. If clz is 0, then the MSB of the argument is set, and if clz is prec-1, th= en the argument is 1. 2020-12-31 Jakub Jelinek PR tree-optimization/94802 * match.pd (clz(X) =3D=3D 0 -> (int)X < 0): New simplification. (clz(X) =3D=3D (prec-1) -> X =3D=3D 1): Likewise. * gcc.dg/tree-ssa/pr94802-1.c: New test.=