From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id EC1DD3858C1F for ; Tue, 22 Nov 2022 07:50:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EC1DD3858C1F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM4jSD4032098; Tue, 22 Nov 2022 07:50:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=Ds/UJqZghjro3LD0tabG0J5eUgaU8dTExaWgBLKGHoY=; b=pL0Wt1rWZm5LSYDU+r6nAtnYGvIk7pDRr0lJ9syrKIVNaNcACisjPppoI4YwVXRvV7va YhAWGLlg2SbmjqyRLIyKb2VNFe/otgwM0MUNTNrZJGtcfWEE+gcqYqHruWIl8JJZfIqP qfLeuy3Jq0NowCHX64UAseKbA5xuz58ggl7Iy6SyRikSPZyvD22IhUL4dfliWc+vbsvP UQANHhnGV4B05rfYLNl8cHyJh6eonmr37kK7voPpbzyXLGYVE4RnB9pN8mP17ukqwL2q YfLqkzaM2oyfdR6+GbfEfA/NcbC68XkGVUYN3eet5unMSFzyf58RWXBg/aS4Nl1fVUhR Bw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m0qp3bq3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 07:50:27 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AM7XONc022539; Tue, 22 Nov 2022 07:50:26 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m0qp3bq2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 07:50:26 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AM7ZKVf026446; Tue, 22 Nov 2022 07:50:24 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06ams.nl.ibm.com with ESMTP id 3kxpdhusmf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 07:50:24 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AM7i9Ed39125282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 07:44:09 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF0A3AE045; Tue, 22 Nov 2022 07:50:21 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB092AE04D; Tue, 22 Nov 2022 07:50:19 +0000 (GMT) Received: from [9.197.246.117] (unknown [9.197.246.117]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 22 Nov 2022 07:50:19 +0000 (GMT) Message-ID: Date: Tue, 22 Nov 2022 15:50:19 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000 To: Segher Boessenkool Cc: David Edelsohn , gcc-patches , "Kewen.Lin" , Peter Bergner References: <438c6628-0b9c-e5d0-e198-2fd6edd16a93@linux.ibm.com> <20221118121822.GY25951@gate.crashing.org> <4056dfc0-57e3-0d13-633c-297572c5c647@linux.ibm.com> <20221121234937.GE25951@gate.crashing.org> From: HAO CHEN GUI In-Reply-To: <20221121234937.GE25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: qWEiJTm4ttkFbu5uBI3tTJZveAkXBjqW X-Proofpoint-GUID: segBfeUxEyYAzAJdOAOiMS6TI6qgwul3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-22_04,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 impostorscore=0 phishscore=0 clxscore=1015 suspectscore=0 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=801 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220055 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Segher, Thanks for your comments. 在 2022/11/22 7:49, Segher Boessenkool 写道: > *cbranch_2insn is not a machine insn. It generates a cror and a branch > insn. This makes no sense to have in a cbranchcc: those do a branch > based on an existing cr field, so based on the *output* of that cror. > > If ifcvt requires differently, ifcvt needs fixing. > I have a question here. For rs6000, "*cbranch_2insn" should not be generated by cbranch_optab? I mean it gets icode from cbranch_optab and generates insn from this icode. If so, the predicate of cbranchcc4 should be checked every time before insn generation other than just doing an assertion. > We want to use the output of the cror multiple times, not generate more > cror insns. > > I don't think the behaviour of ifcvt is correct here at all, no. It > also does not consider the cost of the code as far as I can see? That > could reduce the impact of this problem at least. ifcvt tries to generate the converted sequence. Then it compares the cost of new sequence to the cost of orginial. If it benefits, the conversion will be done. Thanks Gui Haochen