public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@sifive.com>
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Cc: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com,
	palmer@dabbelt.com,  palmer@rivosinc.com, jeffreyalaw@gmail.com,
	rdapp.gcc@gmail.com
Subject: Re: [PATCH] RISC-V: Add TARGET_MIN_VLEN > 4096 check
Date: Mon, 17 Jul 2023 14:12:21 +0800	[thread overview]
Message-ID: <CALLt3TiJNXSx39F6gKRudYpz3q++bC2mh+1W+4f47Z8qdrvUqQ@mail.gmail.com> (raw)
In-Reply-To: <20230717060423.31423-1-juzhe.zhong@rivai.ai>

On Mon, Jul 17, 2023 at 2:05 PM Juzhe-Zhong <juzhe.zhong@rivai.ai> wrote:
>
> gcc/ChangeLog:
>
>         * config/riscv/riscv.cc (riscv_option_override): Report ERROR for TARGET_MIN_VLEN > 4096
>
> ---
>  gcc/config/riscv/riscv.cc | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
> index 6ed735d6983..ce523eea9ba 100644
> --- a/gcc/config/riscv/riscv.cc
> +++ b/gcc/config/riscv/riscv.cc
> @@ -6672,6 +6672,14 @@ riscv_option_override (void)
>        riscv_stack_protector_guard_offset = offs;
>      }
>
> +  /* FIXME: We don't allow TARGET_MIN_VLEN > 4096 since the datatypes of
> +     both GET_MODE_SIZE and GET_MODE_BITSIZE are poly_uint16.
> +
> +     We can only allow TARGET_MIN_VLEN * 8 (LMUL) < 65535.  */
> +  if (TARGET_MIN_VLEN > 4096)
> +    error (

For this scenario, use sorry rather than error,
and I assume this is only a problem for
-param=riscv-autovec-preference=fixed-vlmax?


> +      "Current RISC-V GCC can not support VLEN > 4096bit for 'V' Extension");
> +
>    /* Convert -march to a chunks count.  */
>    riscv_vector_chunks = riscv_convert_vector_bits ();
>  }
> --
> 2.36.1
>

      reply	other threads:[~2023-07-17  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17  6:04 Juzhe-Zhong
2023-07-17  6:12 ` Kito Cheng [this message]

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=CALLt3TiJNXSx39F6gKRudYpz3q++bC2mh+1W+4f47Z8qdrvUqQ@mail.gmail.com \
    --to=kito.cheng@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.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).