Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-16 Thread Segher Boessenkool
On Wed, Dec 16, 2020 at 04:19:12PM +0800, Kewen.Lin wrote: > on 2020/12/15 下午10:40, Segher Boessenkool wrote: > > I mean do > > > > rtx tmp = force_reg (inner_mode, XVECEXP (vals, 0, i)); > > op[i] = simplify_gen_subreg (SImode, tmp, inner_mode, 0); > > > > If that works

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/12/15 下午10:40, Segher Boessenkool wrote: > Hi Ke Wen, > > On Tue, Dec 15, 2020 at 03:53:29PM +0800, Kewen.Lin wrote: >> on 2020/12/15 上午2:51, Segher Boessenkool wrote: >>> On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: --- a/gcc/config/rs6000/rs6000.c +++

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-15 Thread Segher Boessenkool
Hi Ke Wen, On Tue, Dec 15, 2020 at 03:53:29PM +0800, Kewen.Lin wrote: > on 2020/12/15 上午2:51, Segher Boessenkool wrote: > > On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: > >> --- a/gcc/config/rs6000/rs6000.c > >> +++ b/gcc/config/rs6000/rs6000.c > >> @@ -6793,17 +6793,8 @@

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-14 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2020/12/15 上午2:51, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: >> This patch is to use paradoxical subreg instead of >> zero_extend for promoting QI/HI to SI/DI when we >> want to construct one vector with

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-14 Thread Segher Boessenkool
On Wed, Dec 02, 2020 at 04:32:47PM -0600, will schmidt wrote: > On Wed, 2020-12-02 at 17:44 +0800, Kewen.Lin via Gcc-patches wrote: > > * gcc.target/powerpc/pr96933-1.c: Adjusted to check no rlwinm. > > * gcc.target/powerpc/pr96933-2.c: Likewise. > > Ok. (I'd hope a few more extend

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-14 Thread Segher Boessenkool
Hi! On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: > This patch is to use paradoxical subreg instead of > zero_extend for promoting QI/HI to SI/DI when we > want to construct one vector with these modes. > Since we do the gpr->vsx movement and vector merge > or pack later, the high

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-02 Thread will schmidt via Gcc-patches
On Wed, 2020-12-02 at 17:44 +0800, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch is to use paradoxical subreg instead of > zero_extend for promoting QI/HI to SI/DI when we > want to construct one vector with these modes. > Since we do the gpr->vsx movement and vector merge > or pack

[PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-02 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to use paradoxical subreg instead of zero_extend for promoting QI/HI to SI/DI when we want to construct one vector with these modes. Since we do the gpr->vsx movement and vector merge or pack later, the high part is useless and safe to use paradoxical subreg. It can avoid