public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: chenglulu <chenglulu@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn, c@jia.je
Subject: Re: [PATCH v3] LoongArch: Replace -mexplicit-relocs=auto simple-used address peephole2 with combine
Date: Fri, 29 Dec 2023 19:55:58 +0800	[thread overview]
Message-ID: <fa635bcbaa04f2b1be09defd909bb75c9aee6ba6.camel@xry111.site> (raw)
In-Reply-To: <dd1c8651-d9ab-1678-4501-0c62f4966149@loongson.cn>

On Fri, 2023-12-29 at 15:57 +0800, chenglulu wrote:

/* snip */

> > diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
> /* snip */
> > +(define_insn_and_rewrite "simple_load<mode>"
> > +  [(set (match_operand:LD_AT_LEAST_32_BIT 0 "register_operand" "=r,f")
> > +	(match_operand:LD_AT_LEAST_32_BIT 1 "mem_simple_ldst_operand" ""))]
> > +  "loongarch_pre_reload_split () \
> > +   && la_opt_explicit_relocs == EXPLICIT_RELOCS_AUTO \
> Is the '\' here dispensable? I don't seem to have added it when I wrote 
> the conditions.

It seems '\' is not needed, I'll drop them.

/* snip */

> 
> > +(define_predicate "mem_simple_ldst_operand"
> > +  (match_code "mem")
> > +{
> > +  op = XEXP (op, 0);
> > +  return symbolic_pcrel_operand (op, Pmode) ||
> > +	 symbolic_pcrel_offset_operand (op, Pmode);
> > +})
> > +
> >   
> Symbol '||' It shouldn't be at the end of the line.

Indeed.

> 
> +  return symbolic_pcrel_operand (op, Pmode)
> +        || symbolic_pcrel_offset_operand (op, Pmode);
> 
> Others LGTM.
> Thanks!
> 
> /* snip */
> 

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-12-29 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 16:11 Xi Ruoyao
2023-12-29  7:57 ` chenglulu
2023-12-29 11:55   ` Xi Ruoyao [this message]
2023-12-29 12:11     ` Pushed: [PATCH v4] " Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa635bcbaa04f2b1be09defd909bb75c9aee6ba6.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=c@jia.je \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).