Re: [PATCH] RISC-V: Fix bug of tuple move splitter[PR112561]

2023-11-18 Thread Kito Cheng
> On 11/17/23 07:18, Kito Cheng wrote: > > I didn’t take a closer look yet on the ira/lra dump yet, but my feeling > > is that may cause by the earlyclober modifier isn’t work as expect? > > > > Let me take closer look tomorrow. > Remember that constraints aren't checked until register allocation.

Re: [PATCH] RISC-V: Fix bug of tuple move splitter[PR112561]

2023-11-17 Thread Jeff Law
On 11/17/23 07:18, Kito Cheng wrote: I didn’t take a closer look yet on the ira/lra dump yet, but my feeling is that may cause by the earlyclober modifier isn’t work as expect? Let me take closer look tomorrow. Remember that constraints aren't checked until register allocation. So the comb

Re: Re: [PATCH] RISC-V: Fix bug of tuple move splitter[PR112561]

2023-11-17 Thread Kito Cheng
; which is wrong. > > So. we should emit vsetvl, let GCC known the AVL "a7" used is a different > value. > Then bug will be fixed. > > But you remind me a thing, is that for whole register mode , we don't need > this. > So, the code should be adjusted: >

Re: Re: [PATCH] RISC-V: Fix bug of tuple move splitter[PR112561]

2023-11-17 Thread juzhe.zh...@rivai.ai
e memory address is changed into "a7" which is wrong. So. we should emit vsetvl, let GCC known the AVL "a7" used is a different value. Then bug will be fixed. But you remind me a thing, is that for whole register mode , we don't need this. So, the code should be adjusted:

Re: [PATCH] RISC-V: Fix bug of tuple move splitter[PR112561]

2023-11-17 Thread Kito Cheng
> diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc > index 6a2009ffb05..08bbb657a06 100644 > --- a/gcc/config/riscv/riscv-v.cc > +++ b/gcc/config/riscv/riscv-v.cc > @@ -374,10 +374,24 @@ void > emit_vlmax_insn_lra (unsigned icode, unsigned insn_flags, rtx *ops, rtx vl) > { >