Generally LGTM, just one more comment :) > diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc > index 2e91d019f6c..aad046240ee 100644 > --- a/gcc/config/riscv/riscv-v.cc > +++ b/gcc/config/riscv/riscv-v.cc > @@ -724,4 +735,54 @@ gen_avl_for_scalar_move (rtx avl) > } > } > > +HARD_REG_SET > +vector_zero_call_used_regs (HARD_REG_SET need_zeroed_hardregs)
I would prefer this should be moved to riscv.cc too, major concern is we don't want to introduce `hard-reg-set.h` into riscv-protos.h.