> > Do you need to save/restore the vector configuration before and after
> > clearing the vector registers?    If so, that seems to be missing.  If
> > not, it seems like a comment explaining why would be useful.
>
> I'll add some comments in the code and want to explain here first.
> We need not save/restore the vector configurations. Because, by design,
> the RVV requires vsetvl when using vector instructions. When users want to
> use the RVV insns next, they should have to issue vsetvl first.

I think one keypoint here is -fzero-call-used-regs=* emit zeroing
instruction before return,
that means there won't be any vector operations between return and
zeroing instructions,
so we don't need to restore the vcsr after zeroing.

Reply via email to