Message ID | bd94bd06-3855-5948-c726-92e2ca82de91@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9419C385DC0C for <patchwork@sourceware.org>; Mon, 21 Feb 2022 07:57:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9419C385DC0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1645430250; bh=owAKmUxBeG+3yE9U53iaYbRSEuwyyw4P2Q9zYPQV0Jo=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=bHgvqejK6yx/azIXWt3OBLnBRdCuxGcOzLNsnnANMZVSeqR7QyLmfgy0AdIbAObdL TT1Ky5Gk5GKcM4hX1FVNDt8skPPLNh2j6owXLnvXIrEvwHwdDY2GRa0wJoDDGlMV/6 LiOyY9Xd7zd/IDOoLz6mGqqvAlaf7jgmxjrdhUeY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id E5B3A385840A; Mon, 21 Feb 2022 07:57:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5B3A385840A Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21L70wFC008309; Mon, 21 Feb 2022 07:57:01 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ec1tjwe4k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Feb 2022 07:57:01 +0000 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 21L7UBBd014600; Mon, 21 Feb 2022 07:57:01 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ec1tjwe3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Feb 2022 07:57:00 +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 21L7isqX028244; Mon, 21 Feb 2022 07:56:59 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 3ear68rgx7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Feb 2022 07:56:59 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21L7uuhi32637364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 21 Feb 2022 07:56:57 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0C994C04A; Mon, 21 Feb 2022 07:56:56 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8C894C059; Mon, 21 Feb 2022 07:56:56 +0000 (GMT) Received: from [9.171.18.13] (unknown [9.171.18.13]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 21 Feb 2022 07:56:56 +0000 (GMT) Message-ID: <bd94bd06-3855-5948-c726-92e2ca82de91@linux.ibm.com> Date: Mon, 21 Feb 2022 08:56:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: GCC Patches <gcc-patches@gcc.gnu.org>, Jeff Law <jeffreyalaw@gmail.com> Subject: [PATCH] arc: Fix for new ifcvt behavior [PR104154] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: bhNACRtAeaOOZuDfRU_CjJV3Huu4MQA_ X-Proofpoint-GUID: raK3JRnMNVfdVJAJcSS1e8KyM0M9GHHW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-21_02,2022-02-18_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 clxscore=1011 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202210047 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_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Robin Dapp via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Robin Dapp <rdapp@linux.ibm.com> Cc: hp@gcc.gnu.org, jsm28@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
arc: Fix for new ifcvt behavior [PR104154]
|
|
Commit Message
Robin Dapp
Feb. 21, 2022, 7:56 a.m. UTC
Hi,
I figured I'd just go ahead and post this patch as well since it seems
to have fixed the arc build problems.
It would be nice if someone could bootstrap/regtest if Jeff hasn't
already done so. I was able to verify that the two testcases attached
to the PR build cleanly but not much more. Thank you.
Regards
Robin
--
PR104154
gcc/ChangeLog:
* config/arc/arc.cc (gen_compare_reg): Return the CC-mode
comparison ifcvt passed us.
---
From fa98a40abd55e3a10653f6a8c5b2414a2025103b Mon Sep 17 00:00:00 2001
From: Robin Dapp <rdapp@linux.ibm.com>
Date: Mon, 7 Feb 2022 08:39:41 +0100
Subject: [PATCH] arc: Fix for new ifcvt behavior [PR104154]
ifcvt now passes a CC-mode "comparison" to backends. This patch
simply returns from gen_compare_reg () in that case since nothing
needs to be prepared anymore.
PR104154
gcc/ChangeLog:
* config/arc/arc.cc (gen_compare_reg): Return the CC-mode
comparison ifcvt passed us.
---
gcc/config/arc/arc.cc | 6 ++++++
1 file changed, 6 insertions(+)
Comments
Hi Robin, The patch looks good. Please go ahead and merge it, please let me know if you cannot. Thank you, Claudiu On Mon, Feb 21, 2022 at 9:57 AM Robin Dapp via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Hi, > > I figured I'd just go ahead and post this patch as well since it seems > to have fixed the arc build problems. > > It would be nice if someone could bootstrap/regtest if Jeff hasn't > already done so. I was able to verify that the two testcases attached > to the PR build cleanly but not much more. Thank you. > > Regards > Robin > > -- > > PR104154 > > gcc/ChangeLog: > > * config/arc/arc.cc (gen_compare_reg): Return the CC-mode > comparison ifcvt passed us. > > --- > > From fa98a40abd55e3a10653f6a8c5b2414a2025103b Mon Sep 17 00:00:00 2001 > From: Robin Dapp <rdapp@linux.ibm.com> > Date: Mon, 7 Feb 2022 08:39:41 +0100 > Subject: [PATCH] arc: Fix for new ifcvt behavior [PR104154] > > ifcvt now passes a CC-mode "comparison" to backends. This patch > simply returns from gen_compare_reg () in that case since nothing > needs to be prepared anymore. > > PR104154 > > gcc/ChangeLog: > > * config/arc/arc.cc (gen_compare_reg): Return the CC-mode > comparison ifcvt passed us. > --- > gcc/config/arc/arc.cc | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc > index 8cc173519ab..5e40ec2c04d 100644 > --- a/gcc/config/arc/arc.cc > +++ b/gcc/config/arc/arc.cc > @@ -2254,6 +2254,12 @@ gen_compare_reg (rtx comparison, machine_mode omode) > > > cmode = GET_MODE (x); > + > + /* If ifcvt passed us a MODE_CC comparison we can > + just return it. It should be in the proper form already. */ > + if (GET_MODE_CLASS (cmode) == MODE_CC) > + return comparison; > + > if (cmode == VOIDmode) > cmode = GET_MODE (y); > gcc_assert (cmode == SImode || cmode == SFmode || cmode == DFmode); > -- > 2.31.1 > >
Hi Claudiu, > The patch looks good. Please go ahead and merge it, please let me know if > you cannot. I merged the patch leaving your check if (cmode != SImode && cmode != SFmode && cmode != DFmode) return NULL_RTX; in place. It is not strictly necessary anymore but I figured it also kind of documents the preconditions of the code that follows. Regards Robin
diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc index 8cc173519ab..5e40ec2c04d 100644 --- a/gcc/config/arc/arc.cc +++ b/gcc/config/arc/arc.cc @@ -2254,6 +2254,12 @@ gen_compare_reg (rtx comparison, machine_mode omode) cmode = GET_MODE (x); + + /* If ifcvt passed us a MODE_CC comparison we can + just return it. It should be in the proper form already. */ + if (GET_MODE_CLASS (cmode) == MODE_CC) + return comparison; + if (cmode == VOIDmode) cmode = GET_MODE (y); gcc_assert (cmode == SImode || cmode == SFmode || cmode == DFmode);