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 99F293858D37 for ; Tue, 24 Oct 2023 07:37:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99F293858D37 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99F293858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698133030; cv=none; b=qZ2PfYQV47yljFvAmuh5dQtAUN20jUMNQd6pAzaKnBqWLaORNoIWzGsdBTDPRrcNGsX19VztKbcj5nPoZIcuX4hFBxaD7Fiodpzkw044WugatwZEAi3XEpQYY93DumerlMpVwndDTAKqX+w0/EdVjbTxZX0KIT3iJ7SeXZE4mTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698133030; c=relaxed/simple; bh=rvDimh6BzRTCl062Rh9eaZTgcmLYi0BYVf/8MezWZxQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=KWA/OGrF3sJ8CuxdHEiLlDlx9mmhZ0ZZMoQb81cMq1YKFr9uADa60Nndhv5N9JKItXFF+ak54z368XDf+kYg6H8TBbNx4eULFB1u0JV25fGkOYmi9/gwYkxxyKR72lnkuHOudUNG0SCWixIS+lLGNnPZztfZd0BaJj/pQRULYs8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39O7VARf020669; Tue, 24 Oct 2023 07:37:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=bKteYzQ78lOQdGm36lk9XPPqLKzflcOb60en9wzFhmE=; b=k6L3KCgO7rVuQJeTitFWcsRXL5i3R4jgk4tAvf9eohk2f4eiL93erEsimIR5rARPboCB FaWWUijIavUh0/LNoCT7en5vC3pXnrmmBkZpnuHW2mrGPBgpoSjrAGN3DypF6Tbu7uqY CCj0QvByc8EHCtmVEaxCwW/oZTyYvv1vlgHfAyEOyv8TuftFi+jAC05Ob2mox31zysMz UEN0Gwh7L7lCBd4fSTFaO+hhTsnifer3mU+tAoEfENpo4sv7/ZEQrPSNDus4i00nSAhR CWJd/SH3hcpvmxM3+qaxT16b02HNj9SVK8H5c08HXjvzfLnDK66fKlvgjyJG2VoWNpXV yA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tx9knr6d8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 07:37:07 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39O7aYfn006427; Tue, 24 Oct 2023 07:36:43 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tx9knr4uf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 07:36:43 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 39O7K7aZ023789; Tue, 24 Oct 2023 07:36:28 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3tvrysx6gw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 07:36:28 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 39O7aRgG56754672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Oct 2023 07:36:27 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D46258059; Tue, 24 Oct 2023 07:36:27 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E32CC5804B; Tue, 24 Oct 2023 07:36:23 +0000 (GMT) Received: from [9.43.52.246] (unknown [9.43.52.246]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 24 Oct 2023 07:36:23 +0000 (GMT) Message-ID: <8da41716-1111-4550-95dd-de41a402101e@linux.ibm.com> Date: Tue, 24 Oct 2023 13:06:22 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces Content-Language: en-US To: Bernhard Reutner-Fischer Cc: gcc-patches@gcc.gnu.org, Vineet Gupta , Jeff Law , Richard Biener , Segher Boessenkool , Peter Bergner , gnu-toolchain References: <32ca6e0e-ef68-4d4d-b864-c586a688b2c7@linux.ibm.com> <22541c92-a967-4e66-96b3-e4ad5011cd24@rivosinc.com> <20231023161027.362c626b@nbbrfq.loc> From: Ajit Agarwal In-Reply-To: <20231023161027.362c626b@nbbrfq.loc> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: RVMwG26ibvbnKxjc1otI3FPTmi_qkGwU X-Proofpoint-ORIG-GUID: II1VXpABeoy50S5mJxmIKxwi8XYy05Hf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_06,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 mlxlogscore=923 mlxscore=0 bulkscore=0 phishscore=0 adultscore=0 clxscore=1015 spamscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310240063 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP 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: Hello Bernhard: On 23/10/23 7:40 pm, Bernhard Reutner-Fischer wrote: > On Mon, 23 Oct 2023 12:16:18 +0530 > Ajit Agarwal wrote: > >> Hello All: >> >> Addressed below review comments in the version 11 of the patch. >> Please review and please let me know if its ok for trunk. > > s/satisified/satisfied/ > I will fix this. >>> As said, I don't see why the below was not cleaned up before the V1 submission. >>> Iff it breaks when manually CSEing, I'm curious why? > > The function below looks identical in v12 of the patch. > Why didn't you use common subexpressions? > ba Using CSE here breaks aarch64 regressions hence I have reverted it back not to use CSE, >>> >>>>> +/* Return TRUE if reg source operand of zero_extend is argument registers >>>>> + and not return registers and source and destination operand are same >>>>> + and mode of source and destination operand are not same. */ >>>>> + >>>>> +static bool >>>>> +abi_extension_candidate_p (rtx_insn *insn) >>>>> +{ >>>>> + rtx set = single_set (insn); >>>>> + machine_mode dst_mode = GET_MODE (SET_DEST (set)); >>>>> + rtx orig_src = XEXP (SET_SRC (set), 0); >>>>> + >>>>> + if (!FUNCTION_ARG_REGNO_P (REGNO (orig_src)) >>>>> + || abi_extension_candidate_return_reg_p (/*insn,*/ REGNO (orig_src))) >>>>> + return false; >>>>> + >>>>> + /* Mode of destination and source should be different. */ >>>>> + if (dst_mode == GET_MODE (orig_src)) >>>>> + return false; >>>>> + >>>>> + machine_mode mode = GET_MODE (XEXP (SET_SRC (set), 0)); >>>>> + bool promote_p = abi_target_promote_function_mode (mode); >>>>> + >>>>> + /* REGNO of source and destination should be same if not >>>>> + promoted. */ >>>>> + if (!promote_p && REGNO (SET_DEST (set)) != REGNO (orig_src)) >>>>> + return false; >>>>> + >>>>> + return true; >>>>> +} >>>>> + > > >>> >>> As said, please also rephrase the above (and everything else if it obviously looks akin the above). > > thanks