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, Jiahao Xu <xujiahao@loongson.cn>
Subject: Re: Ping: [PATCH] LoongArch: Remove constraint z from movsi_internal
Date: Tue, 16 Jan 2024 14:20:33 +0800	[thread overview]
Message-ID: <6bfa5153e390a7b74b6dbac3bce809a4523db743.camel@xry111.site> (raw)
In-Reply-To: <64fb5a46-02e6-6908-4060-9d092f15819f@loongson.cn>

On Tue, 2024-01-16 at 14:16 +0800, chenglulu wrote:
> 
> 
> 在 2024/1/16 下午1:34, Xi Ruoyao 写道:
> > Ping.
> > 
> > On Fri, 2023-12-15 at 20:56 +0800, Xi Ruoyao wrote:
> > > We don't allow SImode in FCC, so constraint z is never really used
> > > here.
> > > 
> > > gcc/ChangeLog:
> > > 
> > > 	* config/loongarch/loongarch.md (movsi_internal): Remove
> > > 	constraint z.
> > > ---
> > > 
> > > Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?
> > > 
> > >   gcc/config/loongarch/loongarch.md | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
> > > index a5d0dcd65fe..404a663c1a6 100644
> > > --- a/gcc/config/loongarch/loongarch.md
> > > +++ b/gcc/config/loongarch/loongarch.md
> > > @@ -2108,8 +2108,8 @@ (define_expand "movsi"
> > >   })
> > >   
> > >   (define_insn_and_split "*movsi_internal"
> > > -  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,w,*f,f,*r,*m,*r,*z")
> > > -	(match_operand:SI 1 "move_operand" "r,Yd,w,rJ,*r*J,m,*f,*f,*z,*r"))]
> > > +  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,w,*f,f,*r,*m")
> > > +	(match_operand:SI 1 "move_operand" "r,Yd,w,rJ,*r*J,m,*f,*f"))]
> > >     "(register_operand (operands[0], SImode)
> > >       || reg_or_0_operand (operands[1], SImode))"
> > >     { return loongarch_output_move (operands[0], operands[1]); }
> > > @@ -2122,7 +2122,7 @@ (define_insn_and_split "*movsi_internal"
> > >     DONE;
> > >   }
> > >     "
> > > -  [(set_attr "move_type" "move,const,load,store,mgtf,fpload,mftg,fpstore,mftg,mgtf")
> > > +  [(set_attr "move_type" "move,const,load,store,mgtf,fpload,mftg,fpstore")
> > >      (set_attr "mode" "SI")])
> > >   
> Sorry, I have a question. If this place is removed, is movgr2fr in the
> loongarch_output_move function no longer needed?

It's needed for moving SImode into FPR.  "z" is FCC_REGS, not FP_REGS. 
I cannot see movgr2cf or movfr2cf in loongarch_output_move.

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

  reply	other threads:[~2024-01-16  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 12:56 Xi Ruoyao
2024-01-16  5:34 ` Ping: " Xi Ruoyao
2024-01-16  6:16   ` chenglulu
2024-01-16  6:20     ` Xi Ruoyao [this message]
2024-01-16  6:23       ` chenglulu

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=6bfa5153e390a7b74b6dbac3bce809a4523db743.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xuchenghua@loongson.cn \
    --cc=xujiahao@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).