Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-18 Thread Jim Wilson
On Wed, Sep 18, 2019 at 3:27 AM Kito Cheng wrote: > On Wed, Sep 18, 2019 at 6:25 PM Richard Biener wrote: > > Since it is target specific and for non-primary/secondary targets > > it's the RISC-V maintainers call whether to allow backporting this. > > Generally wrong-code issues can be backported

Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-18 Thread Kito Cheng
Hi Richard: Got it, thanks :) On Wed, Sep 18, 2019 at 6:25 PM Richard Biener wrote: > > On Wed, 18 Sep 2019, Kito Cheng wrote: > > > Hi Jakub, Richard: > > > > This commit is fixing wrong code gen for RISC-V, does it OK to > > backport to GCC 9 branch? > > Since it is target specific and for non

Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-18 Thread Richard Biener
On Wed, 18 Sep 2019, Kito Cheng wrote: > Hi Jakub, Richard: > > This commit is fixing wrong code gen for RISC-V, does it OK to > backport to GCC 9 branch? Since it is target specific and for non-primary/secondary targets it's the RISC-V maintainers call whether to allow backporting this. General

Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-18 Thread Kito Cheng
Hi Jakub, Richard: This commit is fixing wrong code gen for RISC-V, does it OK to backport to GCC 9 branch? On Fri, Sep 6, 2019 at 4:34 AM Jim Wilson wrote: > > Shifting by more than the size of a SUBREG_REG doesn't work, so we either > need to disable splits if an input is paradoxical, or else

Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-06 Thread Segher Boessenkool
Hi Jim, On Thu, Sep 05, 2019 at 04:40:56PM -0700, Jim Wilson wrote: > On Thu, Sep 5, 2019 at 3:03 PM Segher Boessenkool > wrote: > > My big question is why do other targets not have this problem? Or what > > is it they do differently? > > RISC-V doesn't have convenient sign/zero extend instruct

Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-05 Thread Jim Wilson
On Thu, Sep 5, 2019 at 3:03 PM Segher Boessenkool wrote: > My big question is why do other targets not have this problem? Or what > is it they do differently? RISC-V doesn't have convenient sign/zero extend instructions. We also have a 12-bit immediate, whereas most other RISCs have a 16-bit im

Re: [PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-05 Thread Segher Boessenkool
Hi Jim, On Thu, Sep 05, 2019 at 01:34:09PM -0700, Jim Wilson wrote: > Shifting by more than the size of a SUBREG_REG doesn't work, so we either > need to disable splits if an input is paradoxical, or else we need to > generate a clean temporary for intermediate results. My big question is why do

[PATCH] RISC-V: Fix bad insn splits with paradoxical subregs.

2019-09-05 Thread Jim Wilson
Shifting by more than the size of a SUBREG_REG doesn't work, so we either need to disable splits if an input is paradoxical, or else we need to generate a clean temporary for intermediate results. This was tested with rv32i/newlib and rv64gc/linux cross builds and checks. There were no regressions