From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id C601B3858CDB for ; Tue, 24 Oct 2023 20:36:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C601B3858CDB 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 C601B3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698179820; cv=none; b=nT4Xwrmq3S7atNCFX4hgN88A7Na39RiuWEwk0allBpALbXF+k+N+RPxIbdedMLMntdtHDaV2/xkN/gcun4AieHdgmNyz8t25RDdEBdu544zUtCfSvjdb+P43K3k6b8Bd6v7eE5leszBd0QmastQCdNHycHRbIiiVlztjuULvVUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698179820; c=relaxed/simple; bh=oIuXOUJO4hPWvSF1TrRvArFifZyUdrmafdf2bBqj7OM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=FdRO5adL6Qkv+1iKoqkjxPVaEv9UCcJZvRGjIBNaGOQPJMR/T1FglH2W+MS/jgZdHH+kxCw6BcTxiOv8wM3QJBgoG98CyT0Fz+qYlPbv649H8lhWS4ZMoF6kcL+YLxC8paAiOnhJexKjW8XmQq3m/T890xrdKO8hZhRGG8X/9Zs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9a6190af24aso776593666b.0 for ; Tue, 24 Oct 2023 13:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698179817; x=1698784617; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=k6FTCLXvG5DLLOa1d681nD6C07zO2dlop2UhrIY0sg8=; b=PBvmEI2lT9yBasK3ZWr4CiOJpeM8t9H640Yyv4yla7vPTM2ObvaSlFHrizSGQh9U1G kkgQOr2GR44k3rlYBLuLu/b4scO1tk5G/DSdjx2DDEzQi7ogeFicsDpsTxalQDq/Af47 zILLcfB5f0DCrCUz7z2Q0ztzl8N3iFhQX+gQwxp1v84CZLksTw3lfEb8pTHUDE8WTM8U uIgfwcjd1nVJtR5tvNufPA42YgA0c9XBiaVoAKoUTeYMfBEMgIv0kLseO67JXPYU7ZP9 /RZ/2lxb3Z8F0DIf1Vc73Fn9f4kLNlvCFslusjAr6GoDb7kXpm7INtzK0LV7cwR6shb+ VJMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698179817; x=1698784617; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k6FTCLXvG5DLLOa1d681nD6C07zO2dlop2UhrIY0sg8=; b=QCj7T+R7YMVqxMUQlAoYRqlHM7EUL0L6C92OOadxCho0tOEB5jMq4m9HLvW1BCAqHK fYjhq2KeDEAzn9VPG7vEPvw1N4ske6EpRsadNpX+TcSnWY1Kk8Hdum9VLQjKVW2oaDVa 1koT+pB6XJ1Gr39/GBNAwhAkSqiTbPz1m3lYHTt1twQahlKchhZOm4wFb4HqfAnKvytR Yt4krvW9gVKmW6C/AnQrQx5Ylnn65/7M8Mj42neKqq7hUnxl4oethBzGSkVHdwjk+IRs jF0tbs8n1hiI+eHL1r65FL/wgSWu0jKoCs884a8WssX/ArO8FBJ8C5YHD4t6kZBcWO+y E+4A== X-Gm-Message-State: AOJu0YxP3HaV1hvwMD0Y4zrLNcX/AiGZu4mtFkgm2HVBThZIpXd7RKRY iaAnBv0zJZjQFmdVs7QRluNzRhufGFw= X-Google-Smtp-Source: AGHT+IFKemsV2SwEkTRXliPiCW5OIntaBKPYDuKx4Mpui//qHtOmf3Js37XTEAc+FMHa6yw4wuMeHQ== X-Received: by 2002:a17:906:4795:b0:9be:aebc:d480 with SMTP id cw21-20020a170906479500b009beaebcd480mr12102663ejc.24.1698179817194; Tue, 24 Oct 2023 13:36:57 -0700 (PDT) Received: from ?IPv6:::1? ([2001:4bb8:115:4939::4830:19e7]) by smtp.gmail.com with ESMTPSA id v12-20020a1709063bcc00b0099bc2d1429csm8730659ejf.72.2023.10.24.13.36.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 13:36:56 -0700 (PDT) Date: Tue, 24 Oct 2023 22:36:53 +0200 From: rep.dot.nop@gmail.com To: Ajit Agarwal CC: gcc-patches@gcc.gnu.org, Vineet Gupta , Jeff Law , Richard Biener , Segher Boessenkool , Peter Bergner , gnu-toolchain Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v9_4/4=5D_ree=3A_Improve_ree_pass_fo?= =?US-ASCII?Q?r_rs6000_target_using_defined_ABI_interfaces?= In-Reply-To: <8da41716-1111-4550-95dd-de41a402101e@linux.ibm.com> References: <32ca6e0e-ef68-4d4d-b864-c586a688b2c7@linux.ibm.com> <22541c92-a967-4e66-96b3-e4ad5011cd24@rivosinc.com> <20231023161027.362c626b@nbbrfq.loc> <8da41716-1111-4550-95dd-de41a402101e@linux.ibm.com> Message-ID: <4077DE16-87DA-4DDE-B119-6B516944B632@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.6 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 24 October 2023 09:36:22 CEST, Ajit Agarwal = wrote: >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: >>=20 >>> Hello All: >>> >>> Addressed below review comments in the version 11 of the patch=2E >>> Please review and please let me know if its ok for trunk=2E >>=20 >> s/satisified/satisfied/ >>=20 > >I will fix this=2E thanks! > >>>> As said, I don't see why the below was not cleaned up before the V1 s= ubmission=2E >>>> Iff it breaks when manually CSEing, I'm curious why? >>=20 >> The function below looks identical in v12 of the patch=2E >> Why didn't you use common subexpressions? >> ba > >Using CSE here breaks aarch64 regressions hence I have reverted it back= =20 >not to use CSE, Just for my own education, can you please paste your patch perusing common= subexpressions and an assembly diff of the failing versus working aarch64 = testcase, along how you configured that failing (cross-?)compiler and the c= ommand-line of a typical testcase that broke when manually CSEing the funct= ion below? I might have not completely understood the subtile intricacies of RTL re-e= ntrancy, it seems? thanks >>>> =20 >>>>>> +/* Return TRUE if reg source operand of zero_extend is argument re= gisters >>>>>> + and not return registers and source and destination operand are= same >>>>>> + and mode of source and destination operand are not same=2E */ >>>>>> + >>>>>> +static bool >>>>>> +abi_extension_candidate_p (rtx_insn *insn) >>>>>> +{ >>>>>> + rtx set =3D single_set (insn); >>>>>> + machine_mode dst_mode =3D GET_MODE (SET_DEST (set)); >>>>>> + rtx orig_src =3D XEXP (SET_SRC (set), 0); >>>>>> + >>>>>> + if (!FUNCTION_ARG_REGNO_P (REGNO (orig_src)) >>>>>> + || abi_extension_candidate_return_reg_p (/*insn,*/ REGNO (or= ig_src))) =20 >>>>>> + return false; >>>>>> + >>>>>> + /* Mode of destination and source should be different=2E */ >>>>>> + if (dst_mode =3D=3D GET_MODE (orig_src)) >>>>>> + return false; >>>>>> + >>>>>> + machine_mode mode =3D GET_MODE (XEXP (SET_SRC (set), 0)); >>>>>> + bool promote_p =3D abi_target_promote_function_mode (mode); >>>>>> + >>>>>> + /* REGNO of source and destination should be same if not >>>>>> + promoted=2E */ >>>>>> + if (!promote_p && REGNO (SET_DEST (set)) !=3D REGNO (orig_src)) >>>>>> + return false; >>>>>> + >>>>>> + return true; >>>>>> +} >>>>>> + =20 >>=20 >>=20 >>>> >>>> As said, please also rephrase the above (and everything else if it ob= viously looks akin the above)=2E >>=20 >> thanks