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 78850385C335; Tue, 30 Aug 2022 09:44:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 78850385C335 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 (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27U9IZeP008134; Tue, 30 Aug 2022 09:44:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id; s=pp1; bh=QEXIg8r5HR3W5Jpxk784zK+l+pN5u7H3MLLQd8BU77g=; b=VYi3TKbEWLj6iT+N2msyD6+fKUsiyllYOTZMhRwsZExdpxFLOQMUbjd9l8glyiM2a6le AZyrvC2yPBWRbfHOyBbxKb9jEkfUQ9a+/7ZNH8FFgxqVPXQ78gxdvXWA4bXP8gckGdvU p5SJdYOpcB0x7J43MnxEbtxcyuKdE9nbTQDqUnNi0qGrx9GD4mOCAa5FnGaZN0SdId8V 3KKHtOuB3C5nCmzpSxXO63ZC4LkaKX5biVZX0FlBwDFtY1ZpMna37siVSD+l/nSfDd+D IuZa7bkNnEGRtYDC+UvKqKsEq6creU9Ss77nFfKF35AaojWJ7qDvZuDUhydlDvbZrGel 0w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j9ft91j8x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Aug 2022 09:44:33 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27U9Jmk8014879; Tue, 30 Aug 2022 09:44:32 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j9ft91j6d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Aug 2022 09:44:32 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27U9ZfvY028458; Tue, 30 Aug 2022 09:44:30 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3j7aw93h8t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Aug 2022 09:44:30 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27U9iSpa31457668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Aug 2022 09:44:28 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F0148AE045; Tue, 30 Aug 2022 09:44:27 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31C5EAE04D; Tue, 30 Aug 2022 09:44:27 +0000 (GMT) Received: from pike.rch.stglabs.ibm.com (unknown [9.5.12.127]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 30 Aug 2022 09:44:27 +0000 (GMT) From: Jiufu Guo To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, guojiufu@linux.ibm.com Subject: [PATCH]rs6000: remove unused splitter on const_scalar_int_operand Date: Tue, 30 Aug 2022 17:44:26 +0800 Message-Id: <20220830094426.94692-1-guojiufu@linux.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: PQnyhPG5m4vQBOKJVfOXObKkwR-LWfyT X-Proofpoint-GUID: muBmGOiOv7mc823ANC74jil1fPVzUHA_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-30_04,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 malwarescore=0 mlxlogscore=999 priorityscore=1501 adultscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208300046 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: Hi, There are two splitters, both are calling rs6000_emit_set_const to emit instructions for constant building. One splitter checks `const_int_operand`, this splitter is always used. Another spitter checks `const_scalar_int_operand`, this one is never used now. Checking the history, that splitter is introduced around 1999 for HOST_BITS_PER_WIDE_INT=32, as below: (define_split [(set (match_operand:DI 0 "gpc_reg_operand" "") (match_operand:DI 1 "const_double_operand" ""))] "HOST_BITS_PER_WIDE_INT == 32 && TARGET_POWERPC64 && num_insns_constant (operands[1], DImode) > 1" And `HOST_BITS_PER_WIDE_INT == 32` is eliminated later, since it is `const_double_operand` can cover it. When wide_int is introduced, `const_double_operand` is replaced by `const_scalar_int_operand`. Now, HOST_BITS_PER_WIDE_INT is forced to 64, this splitter is safe to remove. Bootstrap and regtest pass on ppc64 and ppc64le. Is this ok for trunk? BR, Jeff gcc/ChangeLog: * config/rs6000/rs6000.md (const_scalar_int splitter): Remove. --- gcc/config/rs6000/rs6000.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index e9e5cd1e54d..2a177936689 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -9717,19 +9717,6 @@ (define_split FAIL; }) -(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)))] -{ - if (rs6000_emit_set_const (operands[0], operands[1])) - DONE; - else - FAIL; -}) - (define_split [(set (match_operand:DI 0 "altivec_register_operand") (match_operand:DI 1 "s5bit_cint_operand"))] -- 2.17.1