From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD7523858D37; Mon, 26 Sep 2022 20:27:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD7523858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664224037; bh=p4672r5LkWWfsuwl14hb9BtswnGJ2ajmzq7A9VFATE8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=azYjZTg5uUGegVO+X8HG1rKwVPxogZ3PcqAYYBaJC439+n5HNQUeXARD0+mM4jXQz C1MNUIxU+HDien+D9fc/Qp1rx4a8g7IWYCmdh89X3crGSIF9DSUuYapTZANPRVN0tM kihKjAcoY+WtJADWdwoHUtSjHL2pvP6eI4OFlvUE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107043] range information not used in popcount Date: Mon, 26 Sep 2022 20:27:17 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia 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: bug_status cf_reconfirmed_on everconfirmed bug_severity 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=3D107043 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2022-09-26 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Andrew Pinski --- Confirmed. The following two should be optimized too: int g0(int n) { int n1 =3D n & 0x8000; if (n1 =3D=3D 0) return 1; // n1 will be 0x8000 here. return (n1 >> 15) & 0x1; } int g1(int n) { int n1 =3D n & 0x8000; if (n1 =3D=3D 0) return 1; // n>>15 will be xxxxxx1 here. return (n >> 15) & 0x1; }=