public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juzhe.zhong at rivai dot ai" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/109104] [13 Regression] ICE: in gen_reg_rtx, at emit-rtl.cc:1171 with -fzero-call-used-regs=all -march=rv64gv
Date: Tue, 14 Mar 2023 08:49:38 +0000	[thread overview]
Message-ID: <bug-109104-4-xk0K3JOaj8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109104-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109104

--- Comment #2 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
(In reply to Roger Sayle from comment #1)
> Not exactly my area of expertise, but adding
> 
>   if (!can_create_pseudo_p ())
>     return false;
> 
> at the start of legitimize_move on line 262 of riscv-v.cc should help.
> Other solutions include clearing a vector register without requiring
> a scalar register (to set the vector length) by xoring it with itself,
> or possibly providing a riscv backend target hook to override the default
> default_zero_call_used_regs implementation.
> 
> If the vector length can be set to zero, that might be an alternative
> to clearing call-used vector registers.

We (me && kito) are trying to find the solution to fix it.
Actually, xoring itself can not help since vxor.vv also needs 
vsetvl a5,zero.... Setting vector-length to be VLMAX.

We don't have an instruction in RVV ISA can zero a whole vector register
without
vsetvl to setting VLMAX vector-length.

I think maybe Kito knows how to fix it.

We will definetely fix it soon in GCC 13.

Thanks.

  parent reply	other threads:[~2023-03-14  8:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 10:53 [Bug target/109104] New: " zsojka at seznam dot cz
2023-03-11 16:31 ` [Bug target/109104] " pinskia at gcc dot gnu.org
2023-03-14  8:43 ` roger at nextmovesoftware dot com
2023-03-14  8:49 ` juzhe.zhong at rivai dot ai [this message]
2023-03-30 12:06 ` marxin at gcc dot gnu.org
2023-03-30 13:41 ` kito at gcc dot gnu.org
2023-03-31 14:44 ` yanzhang.wang at intel dot com
2023-04-08 14:34 ` law at gcc dot gnu.org
2023-04-11 14:09 ` cvs-commit at gcc dot gnu.org
2023-04-17 13:28 ` [Bug target/109104] [13/14 " kito at gcc dot gnu.org

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=bug-109104-4-xk0K3JOaj8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).