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 E3D973858415; Fri, 12 Aug 2022 09:41:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3D973858415 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27C9fLJx008697; Fri, 12 Aug 2022 09:41:57 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hwkt7s635-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Aug 2022 09:41:56 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27C9YsF9024671; Fri, 12 Aug 2022 09:41:56 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 3hwkt7s62c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Aug 2022 09:41:56 +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 27C9Nv48014598; Fri, 12 Aug 2022 09:41:53 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 3hw3wfrv7v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Aug 2022 09:41:53 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27C9fp2i33685858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Aug 2022 09:41:51 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66EF6AE045; Fri, 12 Aug 2022 09:41:51 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8099EAE04D; Fri, 12 Aug 2022 09:41:49 +0000 (GMT) Received: from [9.197.252.68] (unknown [9.197.252.68]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 12 Aug 2022 09:41:49 +0000 (GMT) Message-ID: Date: Fri, 12 Aug 2022 17:41:47 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] rs6000: avoid ineffective replacement of splitters Content-Language: en-US To: Jiufu Guo Cc: dje.gcc@gmail.com, segher@kernel.crashing.org, linkw@gcc.gnu.org, gcc-patches@gcc.gnu.org References: <20220812063959.151705-1-guojiufu@linux.ibm.com> From: "Kewen.Lin" In-Reply-To: <20220812063959.151705-1-guojiufu@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: N-WF9eqiCrOI630sld4S0f_x8rY1ndql X-Proofpoint-ORIG-GUID: 5_ykrf7dg5z_l25JMML2wMBiKmS8DMEq Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-12_06,2022-08-11_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 spamscore=0 adultscore=0 mlxscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208120026 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Fri, 12 Aug 2022 09:41:59 -0000 Hi Jeff, on 2022/8/12 14:39, Jiufu Guo via Gcc-patches wrote: > Hi, > > As a comment in > https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599556.html > > Those splitters call rs6000_emit_set_const directly, and the replacements > are never used. Using (pc) would be less misleading. Since the replacements are never used, IMHO this subject doesn't quite meet the change. How about "fix misleading new patterns of splitters"? > > This patch pass bootstrap®test on ppc64 BE and LE. > Is this ok for trunk. This patch is OK w/ or w/o subject tweaked. Thanks! BR, Kewen > > BR, > Jeff(Jiufu) > > gcc/ChangeLog: > > * config/rs6000/rs6000.md: (constant splitters): Use "(pc)" as the > replacements. > > --- > gcc/config/rs6000/rs6000.md | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md > index 1367a2cb779..7fadbeef1aa 100644 > --- a/gcc/config/rs6000/rs6000.md > +++ b/gcc/config/rs6000/rs6000.md > @@ -7727,11 +7727,7 @@ (define_split > [(set (match_operand:SI 0 "gpc_reg_operand") > (match_operand:SI 1 "const_int_operand"))] > "num_insns_constant (operands[1], SImode) > 1" > - [(set (match_dup 0) > - (match_dup 2)) > - (set (match_dup 0) > - (ior:SI (match_dup 0) > - (match_dup 3)))] > + [(pc)] > { > if (rs6000_emit_set_const (operands[0], operands[1])) > DONE; > @@ -9662,8 +9658,7 @@ (define_split > [(set (match_operand:DI 0 "int_reg_operand_not_pseudo") > (match_operand:DI 1 "const_int_operand"))] > "TARGET_POWERPC64 && num_insns_constant (operands[1], DImode) > 1" > - [(set (match_dup 0) (match_dup 2)) > - (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))] > + [(pc)] > { > if (rs6000_emit_set_const (operands[0], operands[1])) > DONE; > @@ -9675,8 +9670,7 @@ (define_split > [(set (match_operand:DI 0 "int_reg_operand_not_pseudo") > (match_operand:DI 1 "const_scalar_int_operand"))] > "TARGET_POWERPC64 && num_insns_constant (operands[1], DImode) > 1" > - [(set (match_dup 0) (match_dup 2)) > - (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 3)))] > + [(pc)] > { > if (rs6000_emit_set_const (operands[0], operands[1])) > DONE;