Oh. Yes. Thanks for Robin pointing this. @yanzhang, could you refine this patch more deeply to gain more optimizations ?
Thanks. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-21 14:27 To: yanzhang.wang; gcc-patches CC: rdapp.gcc; juzhe.zhong; kito.cheng; pan2.li Subject: Re: [PATCH] RISC-V: convert the mulh with 0 to mov 0 to the reg. Hi Yanzhang, while I appreciate the optimization, I'm a bit wary about just adding a special case for "0". Is that so common? Wouldn't we also like to have * pow2_p (val) == << val and others? * 1 should also be covered. Regards Robin