From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BBF838FFE4D; Mon, 19 Dec 2022 10:32:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BBF838FFE4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671445974; bh=Khs1elYDJVnK2G0KXZZsVk8yov2ltkJfUN6YV4UgBik=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yAQboyBqr5AHxwFLe48C3VBoR26DMRvzMAhxGZQC65Mygn+F0gFWE+tHUQe9OVJNn s1laRMaz0+TLTEls9l5W3EsV367jD83VwvO3tQ2fdt5pu6F013XwafTxSnDMSrvSKw 9tG7/eicH5Ww/G1+Os7LuAah68MBipsef+zmVAt8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106708] [rs6000] 64bit constant generation with oris xoris Date: Mon, 19 Dec 2022 10:32: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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: 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=3D106708 --- Comment #2 from CVS Commits --- The master branch has been updated by Jiu Fu Guo : https://gcc.gnu.org/g:97a8e88cd7d22562c0ea4f73687d3c93c21e12fb commit r13-4771-g97a8e88cd7d22562c0ea4f73687d3c93c21e12fb Author: Jiufu Guo Date: Mon Dec 19 16:40:01 2022 +0800 rs6000: use li;x?oris to build constant For constant C: If '(c & 0xFFFFFFFF00008000ULL) =3D=3D 0xFFFFFFFF00008000ULL' or say: 32(1) || 16(x) || 1(1) || 15(x), using "li; xoris" would be ok. If '(c & 0xFFFFFFFF80008000ULL) =3D=3D 0x80000000ULL' or say: 32(0) || 1(1) || 15(x) || 1(0) || 15(x), we could use "li; oris" to build constant 'C'. Here N(M) means N continuous bit M, x for M means it is ok for either 1 or 0; '||' means concatenation. This patch update rs6000_emit_set_long_const to support those constants. PR target/106708 gcc/ChangeLog: * config/rs6000/rs6000.cc (rs6000_emit_set_long_const): Add usi= ng "li; x?oris" to build constant. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr106708.c: New test.=