From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 753EC3858C98; Tue, 27 Feb 2024 01:16:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 753EC3858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708996613; bh=XSiNqruuEw0BE3D1LZrWpMTURjRRCvRqP7//B8hxhb8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sEWru67/HfhGSUmJsH9DEMKQxTBaSrSxGauzYjC2qk5x5Ijtdw0meyj5XeTFaGbZb Ue4sJHWV+oBEvSuNWmimiOQEBv1Xn1TiNzVG59GfW92KqNQUbM4nef+EqnQS6QKLXW OFYJXEwRo+5TnrkVvxtJfGh+uphi5D/7yuCMzX54= From: "andrew at sifive dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114087] RISC-V optimization on checking certain bits set ((x & mask) == val) Date: Tue, 27 Feb 2024 01:16:52 +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: 13.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: andrew at sifive dot com 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: cc 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=3D114087 Andrew Waterman changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew at sifive dot com --- Comment #1 from Andrew Waterman --- Note that, in some of these cases, there is a tradeoff. If this code were executed in a loop, such that the constant loads could be hoisted, (2a) wou= ld have a shorter critical path than (2c); likewise (3a) vs. (3c).=