From patchwork Thu Nov 11 11:24:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 1553900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=FUrgPNXW; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HqfrB4sKpz9sCD for ; Thu, 11 Nov 2021 22:39:06 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC560385803B for ; Thu, 11 Nov 2021 11:39:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC560385803B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636630743; bh=GumPAOA7CtUOF2lPupfYOieCA9hcfLvMrW8sc1QDfSE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=FUrgPNXW/lvyoqXFmFem58zLhx7r6LLUX+ucMtOsn9qNSpeBBdhq34LMWYv4zcHv5 ufukj3H8g/bn7vfh+9R+OiIzUe8MoYScD4XZ5FC1dUYGR8p344DjwiEuiUopYNVVvX VprlN+sknfbC9lLRk1jTpOOsHXGD9lOH+QMceUFA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id D2FE43858432; Thu, 11 Nov 2021 11:25:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D2FE43858432 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1ABAhOrX028610; Thu, 11 Nov 2021 11:25:30 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 3c91p096cr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Nov 2021 11:25:30 +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 1ABBP81A005136; Thu, 11 Nov 2021 11:25:25 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 3c5hbaw0nm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Nov 2021 11:25:25 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1ABBPMOP24248794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Nov 2021 11:25:23 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B886E4C040; Thu, 11 Nov 2021 11:25:22 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 032964C04A; Thu, 11 Nov 2021 11:25:22 +0000 (GMT) Received: from trout.aus.stglabs.ibm.com (unknown [9.40.194.100]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 11 Nov 2021 11:25:21 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 15/15] sh: Fix non-robust split condition in define_insn_and_split Date: Thu, 11 Nov 2021 05:24:59 -0600 Message-Id: <9dc4a97a785e0f7e3bda0540ffd3b95edf29ce09.1636621345.git.linkw@linux.ibm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: pFc77xQKJpmiitxwAmXsQWDrM1um1cvu X-Proofpoint-GUID: pFc77xQKJpmiitxwAmXsQWDrM1um1cvu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-11_03,2021-11-08_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1011 priorityscore=1501 suspectscore=0 phishscore=0 malwarescore=0 spamscore=0 bulkscore=0 impostorscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111110066 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Kewen Lin via Gcc-patches From: "Kewen.Lin" Reply-To: Kewen Lin Cc: aoliva@gcc.gnu.org, olegendo@gcc.gnu.org Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This patch is to fix some non-robust split conditions in some define_insn_and_splits, to make each of them applied on top of the corresponding condition for define_insn part, otherwise the splitting could perform unexpectedly. gcc/ChangeLog: * config/sh/sh.md (call_pcrel, call_value_pcrel, sibcall_pcrel, sibcall_value_pcrel): Fix split condition. --- gcc/config/sh/sh.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 93ee7c9a7de..1bb325c7044 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -6566,7 +6566,7 @@ (define_insn_and_split "call_pcrel" (clobber (match_scratch:SI 2 "=&r"))] "TARGET_SH2" "#" - "reload_completed" + "&& reload_completed" [(const_int 0)] { rtx lab = PATTERN (gen_call_site ()); @@ -6678,7 +6678,7 @@ (define_insn_and_split "call_value_pcrel" (clobber (match_scratch:SI 3 "=&r"))] "TARGET_SH2" "#" - "reload_completed" + "&& reload_completed" [(const_int 0)] { rtx lab = PATTERN (gen_call_site ()); @@ -6877,7 +6877,7 @@ (define_insn_and_split "sibcall_pcrel" (return)] "TARGET_SH2 && !TARGET_FDPIC" "#" - "reload_completed" + "&& reload_completed" [(const_int 0)] { rtx lab = PATTERN (gen_call_site ()); @@ -7043,7 +7043,7 @@ (define_insn_and_split "sibcall_value_pcrel" (return)] "TARGET_SH2 && !TARGET_FDPIC" "#" - "reload_completed" + "&& reload_completed" [(const_int 0)] { rtx lab = PATTERN (gen_call_site ());