public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH V4] RISC-V: Enable basic RVV auto-vectorization support.
@ 2023-05-05 14:06 juzhe.zhong
  0 siblings, 0 replies; only message in thread
From: juzhe.zhong @ 2023-05-05 14:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng, palmer, jeffreyalaw, Juzhe-Zhong

From: Juzhe-Zhong <juzhe.zhong@rivai.ai>

This patch is depending on https://patchwork.sourceware.org/project/gcc/patch/20230504054544.203366-1-juzhe.zhong@rivai.ai/
Fix codes according to comments of Kito.

gcc/ChangeLog:

        * config/riscv/riscv.cc (riscv_get_arg_info): Move RVV type argument handling outside.

---
 gcc/config/riscv/riscv.cc | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 1a35e02796d..8d3cd4261d2 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -3791,16 +3791,16 @@ riscv_get_arg_info (struct riscv_arg_info *info, const CUMULATIVE_ARGS *cum,
   info->gpr_offset = cum->num_gprs;
   info->fpr_offset = cum->num_fprs;
 
+  /* TODO: Currently, it will produce ICE for --param
+     riscv-autovec-preference=fixed-vlmax. So, we just return NULL_RTX here
+     let GCC genearte loads/stores. Ideally, GCC should either report
+     Warning message to tell user do not use RVV vector type in function
+     arg, or GCC just support function arg calling convention for RVV
+     directly.  */
+  if (riscv_v_ext_mode_p (mode))
+    return NULL_RTX;
   if (named)
     {
-      /* TODO: Currently, it will produce ICE for --param
-	 riscv-autovec-preference=fixed-vlmax. So, we just return NULL_RTX here
-	 let GCC genearte loads/stores. Ideally, GCC should either report
-	 Warning message to tell user do not use RVV vector type in function
-	 arg, or GCC just support function arg calling convention for RVV
-	 directly.  */
-      if (riscv_v_ext_mode_p (mode))
-	return NULL_RTX;
       riscv_aggregate_field fields[2];
       unsigned fregno = fpr_base + info->fpr_offset;
       unsigned gregno = gpr_base + info->gpr_offset;
-- 
2.36.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-05 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05 14:06 [PATCH V4] RISC-V: Enable basic RVV auto-vectorization support juzhe.zhong

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).