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.

Reply via email to