From: Kito Cheng <kito.cheng@gmail.com>
To: pan2.li@intel.com
Cc: gcc-patches@gcc.gnu.org, juzhe.zhong@rivai.ai, yanzhang.wang@intel.com
Subject: Re: [PATCH v2] RISC-V: Bugfix for vls mode aggregated in GPR calling convention
Date: Tue, 30 Jan 2024 20:54:07 +0800 [thread overview]
Message-ID: <CA+yXCZDWcug1wcs_-qWsKu2jyR_mFvTgz9WSzOLb5FeYHOfSWg@mail.gmail.com> (raw)
In-Reply-To: <20240130083701.3279664-1-pan2.li@intel.com>
Thanks for fixing this bug! LGTM with one minor comment :)
> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
> index 7b6111aa545..1de69019cd4 100644
> --- a/gcc/config/riscv/riscv.cc
> +++ b/gcc/config/riscv/riscv.cc
> @@ -1382,6 +1382,38 @@ riscv_v_ext_mode_p (machine_mode mode)
> || riscv_v_ext_vls_mode_p (mode);
> }
>
> +static unsigned
> +riscv_v_vls_mode_aggregate_gpr_count (unsigned vls_unit_size,
> + unsigned scalar_unit_size)
> +{
> + gcc_assert (vls_unit_size != 0 && scalar_unit_size != 0);
> +
> + if (vls_unit_size < scalar_unit_size)
> + return 1;
> +
Add gcc_assert ((vls_unit_size % scalar_unit_size) == 0); here to make
sure no accident :P
> + return vls_unit_size / scalar_unit_size;
> +}
> +
next prev parent reply other threads:[~2024-01-30 12:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 3:16 [PATCH v1] RISC-V: Bugfix for vls integer mode " pan2.li
2024-01-24 3:18 ` juzhe.zhong
2024-01-24 3:41 ` Li, Pan2
2024-01-24 3:43 ` juzhe.zhong
2024-01-29 13:22 ` Kito Cheng
2024-01-30 8:39 ` Li, Pan2
2024-01-30 8:37 ` [PATCH v2] RISC-V: Bugfix for vls mode aggregated in GPR " pan2.li
2024-01-30 12:54 ` Kito Cheng [this message]
2024-01-30 13:10 ` Li, Pan2
2024-01-30 13:49 ` 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=CA+yXCZDWcug1wcs_-qWsKu2jyR_mFvTgz9WSzOLb5FeYHOfSWg@mail.gmail.com \
--to=kito.cheng@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=pan2.li@intel.com \
--cc=yanzhang.wang@intel.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).