From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 2D5403858D33 for ; Fri, 29 Dec 2023 11:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D5403858D33 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2D5403858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703850966; cv=none; b=F+2XjH9LLDB2lxXy63SrT6Ch3RKundht/fpNFxnytf9W9+gas03WieedItXjnCevM/ApzNWT8o7vcvFzZ/prhg1RXPiBxuezjXrH2YKbROk0DzakEWqWz+Dm94xT0d21YuIKb/GxORkRb8HdSsC98yQvFdPWJp9AI40nB3FbvMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703850966; c=relaxed/simple; bh=pGT4Qrh8oOdde7P6NVuj1nSqOylNgC3yAWIAt27acQ8=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=LzcIgDsZP9sv089n7iGu6LhIpy1cljllR+U0WQTo5qG6xKSpYfaWM3CU9MS44pYfGaOVqIO/CcC1fgieX+40DHkCJcIWhsP0vDW6tEv9Ex12OZueJWTrmL4yzk4azJkjLICwuEIkwvgkdMR4U/mRlE73MGIFuThNFOrZBKAcylk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1703850962; bh=pGT4Qrh8oOdde7P6NVuj1nSqOylNgC3yAWIAt27acQ8=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=dJt3B7rWsAo/VNA572uq8mww0j598tzvm8O44dk3NMZL8krTT8C4OsMQh8NqiPyau vkhOFydqGOdW0c9W4jlMgvsH3TBKWTMxWqVS6GW1QXUXXjspxX8GseoEQRiLofUdLZ 37QK68Vtu8mOaHLrae0544KukDKz2zF/CZeVPyH8= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id B242666938; Fri, 29 Dec 2023 06:56:00 -0500 (EST) Message-ID: Subject: Re: [PATCH v3] LoongArch: Replace -mexplicit-relocs=auto simple-used address peephole2 with combine From: Xi Ruoyao To: chenglulu , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn, c@jia.je Date: Fri, 29 Dec 2023 19:55:58 +0800 In-Reply-To: References: <20231228161611.10555-1-xry111@xry111.site> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 MIME-Version: 1.0 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Fri, 2023-12-29 at 15:57 +0800, chenglulu wrote: /* snip */ > > diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/l= oongarch.md > /* snip */ > > +(define_insn_and_rewrite "simple_load" > > +=C2=A0 [(set (match_operand:LD_AT_LEAST_32_BIT 0 "register_operand" "= =3Dr,f") > > + (match_operand:LD_AT_LEAST_32_BIT 1 "mem_simple_ldst_operand" ""))] > > +=C2=A0 "loongarch_pre_reload_split () \ > > +=C2=A0=C2=A0 && la_opt_explicit_relocs =3D=3D EXPLICIT_RELOCS_AUTO \ > Is the '\' here dispensable? I don't seem to have added it when I wrote= =20 > the conditions. It seems '\' is not needed, I'll drop them. /* snip */ >=20 > > +(define_predicate "mem_simple_ldst_operand" > > +=C2=A0 (match_code "mem") > > +{ > > +=C2=A0 op =3D XEXP (op, 0); > > +=C2=A0 return symbolic_pcrel_operand (op, Pmode) || > > + symbolic_pcrel_offset_operand (op, Pmode); > > +}) > > + > > =C2=A0=20 > Symbol '||' It shouldn't be at the end of the line. Indeed. >=20 > +=C2=A0 return symbolic_pcrel_operand (op, Pmode) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 || symbolic_pcrel_offset_oper= and (op, Pmode); >=20 > Others LGTM. > Thanks! >=20 > /* snip */ >=20 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University