Re: [PATCH v2] RISC-V: elide unnecessary sign extend when expanding cmp_and_jump

2023-10-29 Thread Vineet Gupta
On 10/29/23 19:04, Vineet Gupta wrote: RV64 compare and branch instructions only support 64-bit operands. At Expand time, the backend conservatively zero/sign extends its operands even if not needed, such as incoming 32-bit function args which ABI/ISA guarantee to be sign-extended already.

[PATCH v2] RISC-V: elide unnecessary sign extend when expanding cmp_and_jump

2023-10-29 Thread Vineet Gupta
RV64 compare and branch instructions only support 64-bit operands. At Expand time, the backend conservatively zero/sign extends its operands even if not needed, such as incoming 32-bit function args which ABI/ISA guarantee to be sign-extended already. And subsequently REE fails to eliminate them