From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 885C83858C56; Mon, 4 Mar 2024 07:42:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 885C83858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709538143; bh=1zSB6Ark9PLeRKIGqFzCpBMoJCeyDq75AdkT+VXSgMM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E2h0F3kFdbIy2fj1YXeFGZdvgaj4O9K9ZGGbQvH+EnO3PEc8+UOD5VKHevNVQx8YB Xzs3DMQ4N/rPeRtQ74zFk3dcxfqlji5Z8/8ixxIZFXg7JRmjdHYcGxpHo7GFPpECrm PyoMYP8si/4t1opYNFke4Zpe1PZZa033LCbvqTa0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/90693] Missing popcount simplifications Date: Mon, 04 Mar 2024 07:42:22 +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: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: wilco 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=3D90693 --- Comment #12 from Andrew Pinski --- (In reply to Piotr Siupa from comment #11) > However, I've noticed that: > bool foo(unsigned x) > { > if (x =3D=3D 0) > return true; > else > return std::has_single_bit(x); > } Oh that is because expand does not use flow sensitive ranges/non-zero bits there. There is talk about adding the ability for that but nothing has been done yet.=