From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 5E1AC3858C74 for ; Mon, 23 Oct 2023 14:10:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E1AC3858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5E1AC3858C74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698070234; cv=none; b=f+Qac8pkizRNTUpIkGgPBegkkLKRt9KS1K7qsNJbCh2mXLEqDttDw0NXtnS2Q+Z5DW4fCByUNrWYWxXfbp+x8Gn6YUNNq1eigGen3b4VEa3dF9FucCypm8FHu/cLwDnws1QlK3xNHh8Lxx7EPrtsyX+DiPWF1c2NiunAiWhn6Cg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698070234; c=relaxed/simple; bh=qUJieyjlSzsQ7JvQyWhmjacj7Fu0zTGg4Z5SwPQlJmA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=kLpBvZu4IIsV5rJKYvE0yrn4Iw+MasSAGijLMCoUFSW4MGOXA2i69IZ5Yz/EkAfwih4TDyGgnZTDbvED1AWNJmVdYskDf2jTvZdpZM1EUCxVZMsEi2vVbmu2ZrE/fuyLvb5yPQ11x9G/o3HxZYSWJdBhdgsrgDZq/fnyD5+sQ48= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-533d31a8523so4877469a12.1 for ; Mon, 23 Oct 2023 07:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698070232; x=1698675032; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=sa4W9ZG1G13R1SYUHl0z2TZuafy0Ndc6VaydubWlN+g=; b=iokzorqo+Oyro+2ZYsaie3oa1dJk3zson+s8h3JjItWCh3lmKiKFkE8mTPldPn3Jb7 lNFb0/ay3MUUWojPwwOc3E1pCkBf3DCDJ44Ws9xAKVqg+oM92jlq9Gwxgu/z/2eDexkF 1Fre2twHU1MEkbMA0dxEZMsg0YN3Kf1frXSq+Q5VX55dGkmFwC+xZCzirCL2VuAAQSVu aAcehKlHyUN660TpspOO+NiQTOl5G1c6n7NS4QIGMcXpMowtJ7jeTb7fJiA2P6IwsB8j yE3giu0xFproFHI1soFJQw+rpF1mUe+bQRcSzlUI2NW2UDX1cSekJekMt9Lc14R+LwSA iNtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698070232; x=1698675032; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sa4W9ZG1G13R1SYUHl0z2TZuafy0Ndc6VaydubWlN+g=; b=Kz81sNcVbMTj7HWimhCoaj67qISM3MIhoxZObST0g2gRwkOSVBvwHkoaf6DMDwgw18 8dySB9qPwz5qZYB/kyc3p4ETzHq86edPWBmN7F5jdShuZDbao6F+sobVcZIpQP5lHBE9 squZTEI4edDP+tVBpkks37NKoOjOkKhCdV2UPkVJ1fK8Q/2zoOFFYT8setbZCLny463f Jwlcj3oEsNHmdid9tCbu2Zyvfccfoc6SdGvTJmcg0g9jkMaxlpU3Uq0CioOGtbekHSLO VaqinV5i0qHb00RWKdBOmphDJAJ0rs17GY17MZ1xTpq57cl1Oeb115AvLO1nSdbQgmQR paGA== X-Gm-Message-State: AOJu0Yysc3D7LRLq1R3GvB3Z8KhC2Ly6jCKN9KNeM9p9RJYYGo6cuTpl ITU02ATibwFH/C5VCcNFerY= X-Google-Smtp-Source: AGHT+IHZnFHynl9io85OdqzRZ2hMfdt/qF9S+NmKNLrcVM91h/NtcObmPazq0eond/LEDFBVvBT+gQ== X-Received: by 2002:a50:d596:0:b0:53f:b9d2:d019 with SMTP id v22-20020a50d596000000b0053fb9d2d019mr6691187edi.11.1698070231771; Mon, 23 Oct 2023 07:10:31 -0700 (PDT) Received: from nbbrfq.loc (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id if5-20020a0564025d8500b0053f10da1105sm6375637edb.87.2023.10.23.07.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:10:31 -0700 (PDT) Date: Mon, 23 Oct 2023 16:10:27 +0200 From: Bernhard Reutner-Fischer To: Ajit Agarwal Cc: rep.dot.nop@gmail.com, gcc-patches@gcc.gnu.org, Vineet Gupta , Jeff Law , Richard Biener , Segher Boessenkool , Peter Bergner , gnu-toolchain Subject: Re: [PATCH v9 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces Message-ID: <20231023161027.362c626b@nbbrfq.loc> In-Reply-To: References: <32ca6e0e-ef68-4d4d-b864-c586a688b2c7@linux.ibm.com> <22541c92-a967-4e66-96b3-e4ad5011cd24@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: 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/ > > 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? > > > >>> +/* 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