From: "Li, Pan2" <pan2.li@intel.com>
To: Jeff Law <jeffreyalaw@gmail.com>,
Lehua Ding <lehua.ding@rivai.ai>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>,
"rdapp.gcc@gamil.com" <rdapp.gcc@gamil.com>,
"jeffreyalaw@gamil.com" <jeffreyalaw@gamil.com>,
"palmer@rivosinc.com" <palmer@rivosinc.com>
Subject: RE: [PATCH V2] RISC-V: Ensure vector args and return use function stack to pass [PR110119]
Date: Thu, 15 Jun 2023 01:34:32 +0000 [thread overview]
Message-ID: <MW5PR11MB5908E71C3622C62ADAEA652DA95BA@MW5PR11MB5908.namprd11.prod.outlook.com> (raw)
In-Reply-To: <bf23200b-716f-1875-b647-c3818b8d313e@gmail.com>
Committed with the comment update,, thanks Jeff and Juzhe.
Pan
-----Original Message-----
From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Jeff Law via Gcc-patches
Sent: Thursday, June 15, 2023 3:08 AM
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]
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
prev parent reply other threads:[~2023-06-15 1:34 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
2023-06-15 1:34 ` Li, Pan2 [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=MW5PR11MB5908E71C3622C62ADAEA652DA95BA@MW5PR11MB5908.namprd11.prod.outlook.com \
--to=pan2.li@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gamil.com \
--cc=jeffreyalaw@gmail.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).