From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A3923858D28; Fri, 3 Mar 2023 20:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A3923858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677875950; bh=WiF0FaCNP31OthpEG0ARIoVx8gNL8Ah1MHMy0jwTXL8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Uo6K/b/9ndgUOdOvcgwgwSRNXXPSEtdLLo6yEdJcwjaq0aabPwI74Al3OvWAYIcba FdnqrknT5ypyK1K3rpd0Dp9wEBl2vw5nhqS4lY0rsnFZuO/v+A6KU46TqMpr0QkJth +LhYEcLeGALq8m3M9Q3fECuItjF7rHJHod6jFKoU= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109011] missed optimization in presence of __builtin_ctz Date: Fri, 03 Mar 2023 20:39:10 +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: 12.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109011 --- Comment #4 from Jakub Jelinek --- Hacker's Delight has also a variant for popcount, either .POPCOUNT ((x - 1)= & ~x) or bitsize - .POPCOUNT (x | -x), though a question is if there are any targ= ets which have vector popcount and don't have vector clz nor ctz for some mode.=