From patchwork Tue Aug 30 09:44:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiufu Guo X-Patchwork-Id: 833 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1771779wro; Tue, 30 Aug 2022 02:45:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR5GaEVexbe41ad/ATAlZ2yy4thH5PAZo/uGG0QLi2+k29GKhl6yyI2dhxB/3kZ+lOJRGMTa X-Received: by 2002:a17:907:b0d:b0:741:88e3:8d13 with SMTP id h13-20020a1709070b0d00b0074188e38d13mr6580053ejl.33.1661852723706; Tue, 30 Aug 2022 02:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661852723; cv=none; d=google.com; s=arc-20160816; b=HEVaa1JH6E3MZTPfTC5e+65x0K3tees185IOVzHzqfy2JZ5koDxLjvUwhWtx5bUCfH 1kGve9xip6KeSX2lYt2wyIitUpnnaG7iKi5dc2ICvwcS9uwD5EBN0RPjD+z5WPlc17l7 BbXQHtjIgmsgJupzjXnZkGd/5SqC7QVGUyS11BuB2Iw1NqCrDQ8Ju9sSSW4QFqhdV/um rWAdIQe6UOJCrcQipnuARbAlEd87ZrtoaZC9/A6eSCs35Ia6iSXZVbmKs7QarmCwf/ey 2bL8tKriZKJOxf5K2Nhu0LnrQwqxO/9t56vd8GCDaqqtqXpipdu9NI74Dn5w+uPnE04M gXxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=QEXIg8r5HR3W5Jpxk784zK+l+pN5u7H3MLLQd8BU77g=; b=VmIRgCy9ecn2UWD3k4f9iSotLLXZVcRJWbGKNtFB1Skxym+Jkfz7FyPReWDZiWc7Ve cq1F54w4h6pr0pWEodnI+7IPu6zY4K3jJy8Bg3cc3Nm/jpEuT4nT35pwn9Vngzb2Pr4p fHwyBGgXYR9ohjWuRJbWQE1NNLwcZ6u8nBL8oZ5BxWorDbfH72ikKmq9jYOQBhc0E7eD f6E8Dg8u3xEtOEGNydtjIGgM0hPIqu/gBxtMEsx2fMEN3gkg9yDcvi1UgNvCUzTzPSWH ycklwstIfxFsRPOLzlINbMVyLjTDL9J/VKT5jwEUcATPRWuaqHCXv6r2qd57SkOs/hBE IehQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=G1F1I4Nj; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ds7-20020a170907724700b0073d64fca704si9217727ejc.36.2022.08.30.02.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 02:45:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=G1F1I4Nj; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CD693852764 for ; Tue, 30 Aug 2022 09:45:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CD693852764 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661852721; bh=QEXIg8r5HR3W5Jpxk784zK+l+pN5u7H3MLLQd8BU77g=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=G1F1I4Nj8csSfVo+cKaVZZzsNUqJKK4UbEHON4+SupVZ8dKamgnB4ff7iKzjmdJmJ Wm/Y8KDeAZaab4RprBB56d3ohjZEY0lGxTKFNbtBCYj1QE36p0DU4rvDop46P0tyfU 4J4ELzfDRD+/fpS+Lem8xwjL4ClAtim/PiYRBylM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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 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) To: gcc-patches@gcc.gnu.org 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 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-Patchwork-Original-From: Jiufu Guo via Gcc-patches From: Jiufu Guo Reply-To: Jiufu Guo Cc: dje.gcc@gmail.com, segher@kernel.crashing.org, linkw@gcc.gnu.org Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742578881583702555?= X-GMAIL-MSGID: =?utf-8?q?1742578881583702555?= 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"))]