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 CBBCA3858D1E; Wed, 17 Aug 2022 02:40:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CBBCA3858D1E Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27H2Midr026602; Wed, 17 Aug 2022 02:40:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j0qg2r87s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 02:40:38 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27H2bTPi009082; Wed, 17 Aug 2022 02:40:37 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j0qg2r87b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 02:40:37 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27H2L578031862; Wed, 17 Aug 2022 02:40:36 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03wdc.us.ibm.com with ESMTP id 3j0byfkgt8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 02:40:36 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27H2eaxp4326064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Aug 2022 02:40:36 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 511142805E; Wed, 17 Aug 2022 02:40:36 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B59228059; Wed, 17 Aug 2022 02:40:36 +0000 (GMT) Received: from pike (unknown [9.5.12.127]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS; Wed, 17 Aug 2022 02:40:35 +0000 (GMT) From: Jiufu Guo To: "Kewen.Lin" Cc: dje.gcc@gmail.com, segher@kernel.crashing.org, linkw@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] rs6000: avoid ineffective replacement of splitters References: <20220812063959.151705-1-guojiufu@linux.ibm.com> Date: Wed, 17 Aug 2022 10:40:32 +0800 In-Reply-To: (Kewen Lin's message of "Fri, 12 Aug 2022 17:41:47 +0800") Message-ID: <7eczczk2xr.fsf@pike.rch.stglabs.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: A5ErN73VvfQuC0pUQwFqj5_zB_xM6QMC X-Proofpoint-ORIG-GUID: DARTg3aCpWggKZZsNM3qWyiJ_yxiNfn0 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-17_02,2022-08-16_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 phishscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208170008 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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: Wed, 17 Aug 2022 02:40:40 -0000 Hi, "Kewen.Lin" writes: > 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"? Thanks for your helpful sugguestion! BR, Jeff(Jiufu) > >> >> 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;