From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 746483858D28; Fri, 24 Mar 2023 21:31:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 746483858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679693478; bh=vIEClYsa4Ea+R4BY9+WYnLq7naSsR7DrafrBMo3DhLA=; h=From:To:Subject:Date:From; b=DH0yEJ3QsjDnn8GgkiUOAaP0Zx2R2o0JBiwkWwddKpkVqbmyxRe7VHlVsbW8LBypT rQzP/gtNNWChKG+A8Pq7VUgdzMFU532DLX7SqwRbLuY3qsQl+5FhABQIAHeukiMdLi cts0we4YHRde+3qiUCF/JvyDTmYRqQ/QbBlNm++s= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work116)] Update ChangeLog.* X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work116 X-Git-Oldrev: cfc165a045c7907a563cb0d5798a4994770ca166 X-Git-Newrev: 557eb70f26250a523022edf3b043190875b1cfa7 Message-Id: <20230324213118.746483858D28@sourceware.org> Date: Fri, 24 Mar 2023 21:31:18 +0000 (GMT) List-Id: https://gcc.gnu.org/g:557eb70f26250a523022edf3b043190875b1cfa7 commit 557eb70f26250a523022edf3b043190875b1cfa7 Author: Michael Meissner Date: Fri Mar 24 17:31:09 2023 -0400 Update ChangeLog.* Diff: --- gcc/ChangeLog.meissner | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gcc/ChangeLog.meissner b/gcc/ChangeLog.meissner index 489c3307113..b0bbf1a43f1 100644 --- a/gcc/ChangeLog.meissner +++ b/gcc/ChangeLog.meissner @@ -1,3 +1,47 @@ +==================== Branch work116, patch #1 ==================== + +Make load/cmp fusion know about prefixed loads. + +The issue with the bug is the power10 load GPR + cmpi -1/0/1 fusion +optimization generates illegal assembler code. + +Ultimately the code was dying because the fusion load + compare -1/0/1 patterns +did not handle the possibility that the load might be prefixed. + +The main cause is the constraints for the individual loads in the fusion did not +match the machine. In particular, LWA is a ds format instruction when it is +unprefixed. The code did not also set the prefixed attribute correctly. + +This patch rewrites the genfusion.pl script so that it will have more accurate +constraints for the LWA and LD instructions (which are DS instructions). The +updated genfusion.pl was then run to update fusion.md. Finally, the code for +the "prefixed" attribute is modified so that it considers load + compare +immediate patterns to be like the normal load insns in checking whether +operand[1] is a prefixed instruction. + +I posted a version of patch on March 21st. This patch makes some code changes +suggested in the genfusion.pl code. + +2023-03-21 Michael Meissner + +gcc/ + + PR target/105325 + * gcc/config/rs6000/genfusion.pl (gen_ld_cmpi_p10): Improve generation + of the ld and lwa instructions which use the DS encoding instead of D. + Use the YZ constraint for these loads. Handle prefixed loads better. + Set the sign_extend attribute as appropriate. + * gcc/config/rs6000/fusion.md: Regenerate. + * gcc/config/rs6000/rs6000.md (prefixed attribute): Add fused_load_cmpi + instructions to the list of instructions that might have a prefixed load + instruction. + +gcc/testsuite/ + + PR target/105325 + * g++.target/powerpc/pr105325.C: New test. + * gcc.target/powerpc/fusion-p10-ldcmpi.c: Adjust insn counts. + ==================== Branch work116, baseline ==================== 2023-03-24 Michael Meissner