Re: RISC-V: Eliminate redundant zero extension of minu/maxu operands
On 4/28/23 06:29, Jivan Hakobyan via Gcc-patches wrote: RV64 the following code: unsigned Min(unsigned a, unsigned b) { return a < b ? a : b; } Compiles to: Min: zext.w a1,a1 zext.w a0,a0 minua0,a1,a0 sext.w a0,a0 ret This patch
RISC-V: Eliminate redundant zero extension of minu/maxu operands
RV64 the following code: unsigned Min(unsigned a, unsigned b) { return a < b ? a : b; } Compiles to: Min: zext.w a1,a1 zext.w a0,a0 minua0,a1,a0 sext.w a0,a0 ret This patch removes unnecessary zero extensions of minu/maxu operands. gcc/Chang