Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2024-02-22 Thread Jeff Law
On 2/19/24 21:21, Alexandre Oliva wrote: This backport is the second of two required for the pr111935 testcase, already backported to gcc-13, to pass on riscv64-elf and riscv32-elf. The V_VLS mode iterator, used in the original patch, is not available in gcc-13, and I thought that would be too

[PATCH] RISC-V: Fix error combine of pred_mov pattern

2024-02-19 Thread Alexandre Oliva
This backport is the second of two required for the pr111935 testcase, already backported to gcc-13, to pass on riscv64-elf and riscv32-elf. The V_VLS mode iterator, used in the original patch, is not available in gcc-13, and I thought that would be too much to backport (and maybe so are these two

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-28 Thread Jeff Law via Gcc-patches
On 8/11/23 10:30, Lehua Ding wrote: > But combine doesn't run at -O0.  So something is inconsistent.  I > certainly believe we need to avoid the mem->mem case, but that's > independent of combine and affects all optimization levels. This is an new bug when running all tests after fixing th

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-18 Thread Lehua Ding
On 2023/8/11 23:57, Jeff Law wrote: On 8/8/23 21:54, Lehua Ding wrote: Hi Jeff,  > The pattern's operand 0 explicitly allows MEMs as do the constraints.  > So forcing the operand into a register just seems like it's papering  > over the real problem. The added of force_reg code is address th

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-11 Thread Lehua Ding
>> But combine doesn't run at -O0.  So something is inconsistent.  I >> certainly believe we need to avoid the mem->mem case, but that's >> independent of combine and affects all optimization levels. > This is an new bug when running all tests after fixing the combine bug. > I understand that

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-11 Thread Lehua Ding
> But combine doesn't run at -O0.  So something is inconsistent.  I > certainly believe we need to avoid the mem->mem case, but that's > independent of combine and affects all optimization levels. This is an new bug when running all tests after fixing the combine bug. I understand that maybe I sh

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-11 Thread Jeff Law via Gcc-patches
On 8/8/23 21:54, Lehua Ding wrote: Hi Jeff, > The pattern's operand 0 explicitly allows MEMs as do the constraints. > So forcing the operand into a register just seems like it's papering > over the real problem. The added of force_reg code is address the problem preduced after address th

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-10 Thread Lehua Ding
Hi Jeff, After reconsidering I think the split of pattern you mention makes sense to me. I have split the `@pred_movhttps://gcc.gnu.org/pipermail/gcc-patches/2023-August/626981.html Best, Lehua

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-08 Thread Lehua Ding
Hi Jeff, > The pattern's operand 0 explicitly allows MEMs as do the constraints. > So forcing the operand into a register just seems like it's papering > over the real problem. The added of force_reg code is address the problem preduced after address the error combine. The more restrict condti

Re: [PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-08 Thread Jeff Law via Gcc-patches
On 8/8/23 05:57, Lehua Ding wrote: Hi, This patch fix PR110943 which will produce some error code. This is because the error combine of some pred_mov pattern. Consider this code: ``` #include void foo9 (void *base, void *out, size_t vl) { int64_t scalar = *(int64_t*)(base + 100);

[PATCH] RISC-V: Fix error combine of pred_mov pattern

2023-08-08 Thread Lehua Ding
Hi, This patch fix PR110943 which will produce some error code. This is because the error combine of some pred_mov pattern. Consider this code: ``` #include void foo9 (void *base, void *out, size_t vl) { int64_t scalar = *(int64_t*)(base + 100); vint64m2_t v = __riscv_vmv_v_x_i64m2 (0,