From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4CE23858D32; Thu, 31 Aug 2023 04:46:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4CE23858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693457203; bh=8ja3IaONXio7edRMcHpXI9gXP2L2lnrpP2J9uB1B+bU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X711IKX8Ejv/c7nhK2w9CRaVKJdj//+7hZetmZTaaFZfOYRiiyiqeCOBuQWSTXGcM ZTClvn5KGpy1l2b775Raus4fdNxxc5l/N//r/Kz7QDTT5V+P748/e2PI1OAj4zN+bA AvScDHpGwZpN0xH6ou1kM6NIEKe1IHylMkJuyj6w= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111252] LoongArch: Suboptimal code for (a & ~mask) | (b & mask) where mask is a constant with value ((1 << n) - 1) << m Date: Thu, 31 Aug 2023 04:46:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.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: 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=3D111252 --- Comment #3 from Andrew Pinski --- The easiest fix for __builtin_copysignf128 is change expand_copysign_bit in optabs.cc to use extract_bit_field to do the extraction and store_bit_field= for the insert instead of what it currently does of using ands and ors ...=