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 D61CD385841A for ; Tue, 22 Nov 2022 03:11:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D61CD385841A 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 (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AM1xV5R009029; Tue, 22 Nov 2022 03:11:34 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=ArkuDVCKGU2zoZEZoX7C0JaLod7p0nraSB9uMXMi3wg=; b=G+RQrpFbRJIIttEtoCbK6vp60ff2s+DhP4ql2vRf8lwqrUXCbOQHZpYw2280p2B48/Av q+qVaTaso3ojZUVSAL4mO6KnB9/EScpLGvO0QCNMO+9/pW7y92DerDpj1l7QaEXpKI/5 vMwAqVNrOZLBc44o2sITWF04cJaV6I9gf9v5iyaObaKeKCXRmsp5c9CBFOubj3FqT3bC 5ArXcRZCdI+7VPaFxhBWq/DH/JDJ3AK/s9I9+WDWWbtSLLg9Uad5S4mgobrvNyEuukB7 DSL1WkaPWc8E4+gbFFAocBCBkHYT4Ar0MohB/n7PUFIHN6oLGYTEU3ROk9UNn/+tTkY7 IA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m0n8g173b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 03:11:34 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AM31Nxu007850; Tue, 22 Nov 2022 03:11:33 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m0n8g1731-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 03:11:33 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AM35Nhq010107; Tue, 22 Nov 2022 03:11:32 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03fra.de.ibm.com with ESMTP id 3kxps92ka4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2022 03:11:31 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AM3BSQw37356136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Nov 2022 03:11:28 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5383842042; Tue, 22 Nov 2022 03:11:28 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 608D942041; Tue, 22 Nov 2022 03:11:26 +0000 (GMT) Received: from [9.200.45.208] (unknown [9.200.45.208]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 22 Nov 2022 03:11:26 +0000 (GMT) Message-ID: <172f8c34-fc63-8434-0528-4261b5c6a8ba@linux.ibm.com> Date: Tue, 22 Nov 2022 11:11:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000 Content-Language: en-US To: HAO CHEN GUI Cc: David Edelsohn , gcc-patches , Peter Bergner , Segher Boessenkool References: <438c6628-0b9c-e5d0-e198-2fd6edd16a93@linux.ibm.com> <20221118121822.GY25951@gate.crashing.org> <4056dfc0-57e3-0d13-633c-297572c5c647@linux.ibm.com> From: "Kewen.Lin" In-Reply-To: <4056dfc0-57e3-0d13-633c-297572c5c647@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: rt3VAxiv6fEG57f33zkL2PTmP8Z1kSRl X-Proofpoint-ORIG-GUID: Zw5fHL34EArmCwcwTUfhybuvRQdcyRKU 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-21_18,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211220020 X-Spam-Status: No, score=-4.6 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 Haochen, Thanks for the explanation. on 2022/11/21 14:18, HAO CHEN GUI wrote: > Hi Segher, > > 在 2022/11/18 20:18, Segher Boessenkool 写道: >> I don't think we should pretend we have any conditional jumps the >> machine does not actually have, in cbranchcc4. When would this ever be >> useful? cror;beq can be quite expensive, compared to the code it would >> replace anyway. >> >> If something generates those here (which then ICEs later), that is >> wrong, fix *that*? Is it ifcvt doing it? > > "*cbranch_2insn" is a valid insn for rs6000. So it generates such insn > at expand pass. The "prepare_cmp_insn" called by ifcvt just wants to verify > that the following comparison rtx is valid. Maybe we can adjust prepare_cmp_insn to fail if the constructed cbranchcc4 pattern doesn't satisfy the predicate of operand 0 rather than to assert. It's something like: if (!insn_operand_matches (icode, 0, test)) goto fail; or only assign and return if insn_operand_matches (icode, 0, test). The code makes the assumption that all this kind of cbranchcc4 patterns should match what target defines for cbranchcc4 optab, but unfortunately it's not sure for our port and I don't see how it should be. BR, Kewen