No, we didn't undo the optimization. We just disallow move pattern for (set (reg) (VL_REGNUM)). juzhe.zhong@rivai.ai From: Robin Dapp Date: 2024-01-22 19:25 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [PATCH] RISC-V: Fix regressions due to 86de9b66480b710202a2898cf513db105d8c432f Hi Juzhe, in principle this seems ok to me but I wonder about: > We shouldn't worry about subreg:...VL_REGNUM since it's impossible > that we can have such situation, I think we allow this in legitimize_move for situations like (subreg:SI (reg:V4QI)). That was not added for correctness but optimization - are we sure we don't undo this optimization with that change? Regards Robin