https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113495
--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to JuzheZhong from comment #14) > Oh. I known the reason now. > > The issue is not RISC-V backend VSETVL PASS. > > It's memory bug of rtx_equal_p I think. It is not rtx_equal_p but rather RVV_VLMAX which is defined as: riscv-protos.h:#define RVV_VLMAX gen_rtx_REG (Pmode, X0_REGNUM) Seems like you could cache that somewhere ...