public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Lehua Ding <lehua.ding@rivai.ai>, gcc-patches@gcc.gnu.org
Cc: juzhe.zhong@rivai.ai, rdapp.gcc@gamil.com, jeffreyalaw@gamil.com,
	palmer@rivosinc.com
Subject: Re: [PATCH V2] RISC-V: Ensure vector args and return use function stack to pass [PR110119]
Date: Wed, 14 Jun 2023 13:07:31 -0600	[thread overview]
Message-ID: <bf23200b-716f-1875-b647-c3818b8d313e@gmail.com> (raw)
In-Reply-To: <20230614115611.2227435-1-lehua.ding@rivai.ai>



On 6/14/23 05:56, Lehua Ding wrote:
> The V2 patch address comments from Juzhe, thanks.
> 
> Hi,
>   
> The reason for this bug is that in the case where the vector register is set
> to a fixed length (with `--param=riscv-autovec-preference=fixed-vlmax` option),
> TARGET_PASS_BY_REFERENCE thinks that variables of type vint32m1 can be passed
> through two scalar registers, but when GCC calls FUNCTION_VALUE (call function
> riscv_get_arg_info inside) it returns NULL_RTX. These two functions are not
> unified. The current treatment is to pass all vector arguments and returns
> through the function stack, and a new calling convention for vector registers
> will be added in the future.
>   
> Best,
> Lehua
> 
>          PR target/110119
> 
> gcc/ChangeLog:
> 
>          * config/riscv/riscv.cc (riscv_get_arg_info): Return NULL_RTX for vector mode
>          (riscv_pass_by_reference): Return true for vector mode
> 
> gcc/testsuite/ChangeLog:
> 
>          * gcc.target/riscv/rvv/base/pr110119-1.c: New test.
>          * gcc.target/riscv/rvv/base/pr110119-2.c: New test.
And just to be clear, I've asked for a minor comment update.  The usual 
procedure is to go ahead and post a V3.  In this case I'll also give 
that V3 pre-approval.  So no need to wait for additional acks.  Post it 
and it can be committed immediately.

jeff

  parent reply	other threads:[~2023-06-14 19:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 11:56 Lehua Ding
2023-06-14 11:59 ` juzhe.zhong
2023-06-14 12:01 ` juzhe.zhong
2023-06-14 18:59   ` Jeff Law
2023-06-14 12:03 ` juzhe.zhong
2023-06-14 12:05   ` Robin Dapp
2023-06-14 19:05     ` Jeff Law
2023-06-14 19:07 ` Jeff Law [this message]
2023-06-15  1:34   ` 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=bf23200b-716f-1875-b647-c3818b8d313e@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gamil.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=lehua.ding@rivai.ai \
    --cc=palmer@rivosinc.com \
    --cc=rdapp.gcc@gamil.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).