From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D37CA3858D1E; Sat, 5 Mar 2022 05:03:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D37CA3858D1E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104698] Inefficient code for DI to TI sign extend on power10 Date: Sat, 05 Mar 2022 05:03:20 +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: 11.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Mar 2022 05:03:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104698 --- Comment #4 from CVS Commits --- The master branch has been updated by Michael Meissner : https://gcc.gnu.org/g:1301d7f647c7ac40da7f910aa6e790205e34bb8b commit r12-7501-g1301d7f647c7ac40da7f910aa6e790205e34bb8b Author: Michael Meissner Date: Sat Mar 5 00:01:52 2022 -0500 Optimize signed DImode -> TImode on power10. On power10, GCC tries to optimize the signed conversion from DImode to TImode by using the vextsd2q instruction. However to generate this instruction, it would have to generate 3 direct moves (1 from the GPR registers to the altivec registers, and 2 from the altivec registers to the GPR register). This patch generates the shift right immediate instruction to do the conversion if the target/source registers ares GPR registers like it do= es on earlier systems. If the target/source registers are Altivec registe= rs, it will generate the vextsd2q instruction. 2022-03-05 Michael Meissner gcc/ PR target/104698 * config/rs6000/vsx.md (UNSPEC_MTVSRD_DITI_W1): Delete. (mtvsrdd_diti_w1): Delete. (extendditi2): Convert from define_expand to define_insn_and_split. Replace with code to deal with both GPR registers and with altivec registers. gcc/testsuite/ PR target/104698 * gcc.target/powerpc/pr104698-1.c: New test. * gcc.target/powerpc/pr104698-2.c: New test.=