From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1715B3858CDA; Sat, 25 Mar 2023 00:56:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1715B3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679705818; bh=UcMUT22FIzyw2NfihExh8cfTSHwq3PyL5a0vxwS40E0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PPEa+GV9MBKZbyAAEj8d3PfCdKmq2gpxvL7iYA+2dFxwL4UyCx/DOBl2yqsEoavLU 7OgGxb/FL+dMz1csg+WnDkp6RSCjAw4r2HQUySVg3ZEK4f1uEZZo++O7OrANmdnD9Y 1jeBNUtO3aHet/eIDAZSUVfc6CrLGv76cPaYkY2Y= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109279] RISC-V: complex constants synthesized should be improved Date: Sat, 25 Mar 2023 00:56:57 +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: 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=3D109279 --- Comment #12 from Andrew Pinski --- Here is something to look into: #define const1 0x0101010101010101ULL=20 #define const2 0x0080402010080400ULL=20 #define const0 const1 unsigned long long g(unsigned long long occ, const unsigned int sq) { return const0 ; } 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; }=