RE: [PATCH v2] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-13 Thread Li, Pan2
-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; rdapp@gmail.com Subject: Re: [PATCH v2] RISC-V: Support IMM for operand 0 of ussub pattern On 8/13/24 9:47 PM, Li, Pan2 wrote: >>> +static rtx >>> +riscv_gen_unsigned_xmode_reg (rtx x, machine_mode mode) >

Re: [PATCH v2] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-13 Thread Jeff Law
On 8/13/24 9:47 PM, Li, Pan2 wrote: +static rtx +riscv_gen_unsigned_xmode_reg (rtx x, machine_mode mode) +{ + if (!CONST_INT_P (x)) +return gen_lowpart (Xmode, x); + + rtx xmode_x = gen_reg_rtx (Xmode); + HOST_WIDE_INT cst = INTVAL (x); + + emit_move_insn (xmode_x, x); + + int xmode_b

RE: [PATCH v2] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-13 Thread Li, Pan2
given the incoming rtx x is const_int which is DImode(integer promoted) for ussub. I will rebase this patch after PR116278 commit, and give a try for this. Pan -Original Message- From: Jeff Law Sent: Wednesday, August 14, 2024 11:33 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.

Re: [PATCH v2] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-13 Thread Jeff Law
On 8/13/24 8:23 PM, Li, Pan2 wrote: This Patch may requires rebase, will send v3 for conflict resolving. Pan -Original Message- From: Li, Pan2 Sent: Sunday, August 4, 2024 7:48 PM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rda

RE: [PATCH v2] RISC-V: Support IMM for operand 0 of ussub pattern

2024-08-13 Thread Li, Pan2
This Patch may requires rebase, will send v3 for conflict resolving. Pan -Original Message- From: Li, Pan2 Sent: Sunday, August 4, 2024 7:48 PM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.com; Li, Pan2 Subject: [PA