From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 49F453858402 for ; Mon, 13 Sep 2021 22:10:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 49F453858402 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 18DKKMPZ017278; Mon, 13 Sep 2021 18:10:46 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3b23hatj6r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Sep 2021 18:10:46 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 18DM0j1x030006; Mon, 13 Sep 2021 18:10:46 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3b23hatj6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Sep 2021 18:10:46 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 18DLq0Za029910; Mon, 13 Sep 2021 22:10:45 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04dal.us.ibm.com with ESMTP id 3b0m3a55ev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Sep 2021 22:10:45 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 18DMAiVN36635100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Sep 2021 22:10:44 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C6E7C605D; Mon, 13 Sep 2021 22:10:44 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8ADAEC6057; Mon, 13 Sep 2021 22:10:43 +0000 (GMT) Received: from [9.65.227.44] (unknown [9.65.227.44]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 13 Sep 2021 22:10:43 +0000 (GMT) Subject: Re: [PATCH] rs6000: Disable optimizing multiple xxsetaccz instructions into one xxsetaccz To: Segher Boessenkool Cc: GCC Patches , David Edelsohn References: <8393a33f-50ab-6720-0017-3f012803b990@linux.ibm.com> <20210912192634.GF1583@gate.crashing.org> From: Peter Bergner Message-ID: <190af4bb-8668-f133-bab6-69c04b004018@linux.ibm.com> Date: Mon, 13 Sep 2021 17:10:42 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210912192634.GF1583@gate.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Obov1EiQAFAKP7zpo1xgg6-dRhQZ6ULi X-Proofpoint-ORIG-GUID: 8Zqb6XqtAvKoinUx7LheuEpG_ZBVpoYH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109130048 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2021 22:10:48 -0000 On 9/12/21 2:26 PM, Segher Boessenkool wrote: >> I also removed the mma_xxsetaccz define_expand and >> define_insn_and_split and replaced it with a simple define_insn. > > In the future pleaase do that in a separate patch. That makes it *much* > easier to read and review this. Will do. >> * config/rs6000/mma.md (unspec): Delete UNSPEC_MMA_XXSETACCZ. >> (unspecv): Add UNSPECV_MMA_XXSETACCZ. > > Unrelated to this patch, but I have been wondering this for years: > should we have an unspecv enum at all? It causes some churn, and you > can name the volatile ones UNSPECV_ in either case. I assumed it was needed, but if not, yeah, one enum would seem to be better than two. >> (mma_xxsetaccz): Change to define_insn. Remove match_operand. >> Use UNSPECV_MMA_XXSETACCZ. > > It still has the match_operand. -(define_insn_and_split "*mma_xxsetaccz" +(define_insn "mma_xxsetaccz" [(set (match_operand:XO 0 "fpr_reg_operand" "=d") - (unspec:XO [(match_operand 1 "const_0_to_1_operand" "O")] - UNSPEC_MMA_XXSETACCZ))] + (unspec_volatile:XO [(const_int 0)] + UNSPECV_MMA_XXSETACCZ))] It still has "a" match_operand...for operand 0. The match_operand for operand 1 was what was removed. Want me to reword that as "Remove source match_operand." or "Remove match_operand 1." or ??? >> ;; We can't have integer constants in XOmode so we wrap this in an UNSPEC. > > Does the comment need updating? It may help to point out here that itr > needs to be volatile. I think the comment was referring to the unneeded operand which I have now removed. I could either remove the comment altogether or change it to: ;; We can't have integer constants in XOmode so we wrap this in an ;; UNSPEC_VOLATILE. ...to refer to the dummy zero for the source. Let me know what you want. >> (set_attr "length" "4")]) > > Not new of course: the default length is 4, most insns have that, it > helps to be less verbose. I'll remove that before pushing, thanks! Peter