From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 4DE253954460 for ; Wed, 16 Nov 2022 05:56:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DE253954460 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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AG4QrkS031021; Wed, 16 Nov 2022 05:56:01 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=bmz5JqK9HZLeDkjaFSfCTzXH9X2WYjZ+qgoFqc3NA8I=; b=ig2QXYjScLyUvL4fSfbxrJ4YTpxLGj6g06BUGiCwe0+4P7oFHW9VTouPQkMquuHZ3Caa khk9qfUSqHnoQHj+EX2NQoxxgnqXoK+HV2KXNQRXOR7nlbQCiFD4ziVMMjfWcL62NiKQ lYLEc3DbTUuTMI4wFjctQ3f1Rli2z0N7yg4tslvOkuV98UBONtBuzbHMhaV8fp/YrpTq S14sXMqYW+caU/6eezV3hIRfq18q+qPFGQup9RH+hd95FqPwXbdz83LEdGthAXkGFe0o gaR3FJAJTC49k3MiMEPXCdk/X/GoYUQyB+DUNQ/rQq2rkqxYHFyU+zZz+tCeEidrw5Hm ew== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kvrujskb6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 05:56:01 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2AG5ocLM029751; Wed, 16 Nov 2022 05:56:01 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kvrujska1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 05:56:01 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AG5Zevt026325; Wed, 16 Nov 2022 05:55:58 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 3kt348wc1h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 05:55:58 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AG5tt9U51446236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 05:55:55 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E6824C040; Wed, 16 Nov 2022 05:55:55 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C29024C052; Wed, 16 Nov 2022 05:55:53 +0000 (GMT) Received: from [9.200.144.161] (unknown [9.200.144.161]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 Nov 2022 05:55:53 +0000 (GMT) Message-ID: <8bc4865a-b93f-92a2-c1b9-ac4f9d234c57@linux.ibm.com> Date: Wed, 16 Nov 2022 13:55:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [rs6000, patch] Enable have_cbranchcc4 on rs6000 To: David Edelsohn Cc: gcc-patches , Segher Boessenkool , "Kewen.Lin" , Peter Bergner References: <153badc6-8afc-0695-32b2-ab5a9e0a161d@linux.ibm.com> From: HAO CHEN GUI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: kRq_XHjzMxfE6_xG9bQecJhV66R141xf X-Proofpoint-ORIG-GUID: ui1HAK6IlXwh2AA8Gm1W4vKCkj-Y7lO1 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-15_08,2022-11-15_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=754 spamscore=0 adultscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160040 X-Spam-Status: No, score=-5.4 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 David, I found definition of the operands in 'cbranch'. The argumnets matters. I will create a new expand pattern for cbranchcc4. Thanks a lot for your comments. 'cbranchmode4’ Conditional branch instruction combined with a compare instruction. Operand 0 is a comparison operator. Operand 1 and operand 2 are the first and second operands of the comparison, respectively. Operand 3 is the code_label to jump to. Gui Haochen Thanks 在 2022/11/16 11:04, David Edelsohn 写道: > It's great to add cbranchcc4 to the Power port where it definitely was an omission, but adapting *cbranch for that purpose is the wrong approach.  The changes to the pattern are incorrect because they are covering up a difference in ordering of the operands.  One can argue that the named pattern only enables the functionality in ifcvt and the pattern otherwise is used in its previous role.  But this is a Frankenstein monster approach.  You're trying to twist the existing pattern so that it triggers as cbranchcc4, but creating a pattern that messes up its arguments and only works because the new, named pattern never is called.  This is too ugly.  Please fix.