From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F1DE385B528; Thu, 30 Mar 2023 18:40:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F1DE385B528 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680201629; bh=NbmgH977m4b4MsqwTyS6qG4lNKKVroKsLaaUdko6Wws=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mgli1iqJgO8N0W9uAI0sD1lTY/TvgXVL2EPOcW1HUYH/vf2oQyQfAWnXmQ3VklvDz T7ZJ273YikAgTt2b++0y8IwtLf0Ja8DBFBzSN2ad/uBY56Rx4paZpBv9yh1Xz/gm/h MZxLbQDE3VuGqbib8ox9S9l3Ppe1ab4JFKMxHq6E= From: "vineet.gupta at linux dot dev" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109279] RISC-V: complex constants synthesized should be improved Date: Thu, 30 Mar 2023 18:40:28 +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: unknown X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: vineet.gupta at linux dot dev 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=3D109279 --- Comment #14 from Vineet Gupta --- (In reply to Andrew Pinski from comment #12) > Here is something to look into: > #define const1 0x0101010101010101ULL=20 > #define const0 const1 > unsigned long long f(unsigned long long occ, const unsigned int sq) { > unsigned long long t=3D (const0)>>32<<32 ; > unsigned long long t1=3D (unsigned int)(const0) ; > asm("":"+r"(t)); > return t | t1; > } Before commit 2e886eef7f2 li a5,16842752 addi a5,a5,257 slli a0,a5,32 or a0,a0,a5 ret With commit 2e886eef7f2 li a0,16842752 addi a0,a0,257 mv a5,a0 slli a0,a0,32 or a0,a0,a5 ret With commit 2e886eef7f2 + in_splitter check removed from riscv_move_integer= () li a0,16842752 li a5,16842752 addi a5,a5,257 addi a0,a0,257 slli a0,a0,32 or a0,a0,a5 ret=