public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: 钟居哲 <juzhe.zhong@rivai.ai>
To: kito.cheng <kito.cheng@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	 kito.cheng <kito.cheng@sifive.com>,
	 "Jeff Law" <jeffreyalaw@gmail.com>,
	 rdapp.gcc <rdapp.gcc@gmail.com>
Subject: Re: Re: [PATCH V4] RISC-V: Expand VLS mode to scalar mode move[PR111391]
Date: Fri, 15 Sep 2023 06:26:55 +0800	[thread overview]
Message-ID: <1E912E9C10E7BD2D+202309150626547528448@rivai.ai> (raw)
In-Reply-To: <CA+yXCZABUOOOSg=iE=Uq8kPjsRV1Viy53kOEpxKpW-KTu9Uj=Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]

I don't think it can fix the case when it is -march=rv64gc_zve32x



juzhe.zhong@rivai.ai
 
From: Kito Cheng
Date: 2023-09-15 00:17
To: Juzhe-Zhong
CC: gcc-patches; kito.cheng; jeffreyalaw; rdapp.gcc
Subject: Re: [PATCH V4] RISC-V: Expand VLS mode to scalar mode move[PR111391]
I am thinking what we are doing is something like we are allowing
scalar mode within the vector register, so...not sure should we try to
implement that within the mov pattern?
 
I guess we need some inputs from Jeff.
 
 
e.g.
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 0ecda795b38..ffced41588d 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -7621,6 +7621,9 @@ riscv_hard_regno_mode_ok (unsigned int regno,
machine_mode mode)
    }
  else if (V_REG_P (regno))
    {
+      if (mode is scalar)
+       return true;
+
      if (!riscv_v_ext_mode_p (mode))
       return false;
 
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index 6d6a2b3748c..50bac39f125 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -2035,8 +2035,8 @@ (define_insn "*movdi_32bit"
   (set_attr "ext" "base,base,base,base,d,d,d,d,d,vector")])
 
(define_insn "*movdi_64bit"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r, m,
*f,*f,*r,*f,*m,r")
-       (match_operand:DI 1 "move_operand"         "
r,T,m,rJ,*r*J,*m,*f,*f,*f,vp"))]
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r, m,
*f,*f,*r,*f,*m,r,*vr,*r,*vr,*vr,*m")
+       (match_operand:DI 1 "move_operand"         "
r,T,m,rJ,*r*J,*m,*f,*f,*f,vp,vr,vr,r,m,vr"))]
  "TARGET_64BIT
   && (register_operand (operands[0], DImode)
       || reg_or_0_operand (operands[1], DImode))"
 

  parent reply	other threads:[~2023-09-14 22:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 10:49 Juzhe-Zhong
2023-09-14 16:17 ` Kito Cheng
2023-09-14 21:06   ` Robin Dapp
2023-09-14 22:25     ` 钟居哲
2023-09-14 22:28     ` 钟居哲
2023-09-14 22:26   ` 钟居哲 [this message]
2023-09-15 15:27     ` Jeff Law
2023-09-15 15:34       ` 钟居哲
2023-09-15 15:43         ` Robin Dapp
2023-09-16  9:56           ` Li, Pan2

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=1E912E9C10E7BD2D+202309150626547528448@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=rdapp.gcc@gmail.com \
    /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).