Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-24 Thread Jeff Law via Gcc-patches
On Thu, 2020-08-06 at 06:23 +0100, Richard Sandiford wrote: > luoxhu writes: > > Hi Richard, > > > > On 2020/8/3 22:01, Richard Sandiford wrote: > > > > /* Try a wider mode if truncating the store mode to NEW_MODE > > > > requires a real instruction. */ > > > > if (maybe

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-05 Thread Richard Sandiford
luoxhu writes: > Hi Richard, > > On 2020/8/3 22:01, Richard Sandiford wrote: >>> /* Try a wider mode if truncating the store mode to NEW_MODE >>> requires a real instruction. */ >>> if (maybe_lt (GET_MODE_SIZE (new_mode), GET_MODE_SIZE (store_mode)) >>> @@ -1779,6 +1780,25 @@

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-05 Thread luoxhu via Gcc-patches
Hi Richard, On 2020/8/3 22:01, Richard Sandiford wrote: /* Try a wider mode if truncating the store mode to NEW_MODE requires a real instruction. */ if (maybe_lt (GET_MODE_SIZE (new_mode), GET_MODE_SIZE (store_mode)) @@ -1779,6 +1780,25 @@ find_shift_sequence (poly_int6

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-03 Thread luoxhu via Gcc-patches
On 2020/8/3 22:01, Richard Sandiford wrote: /* Try a wider mode if truncating the store mode to NEW_MODE requires a real instruction. */ if (maybe_lt (GET_MODE_SIZE (new_mode), GET_MODE_SIZE (store_mode)) @@ -1779,6 +1780,25 @@ find_shift_sequence (poly_int64 access_s

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-03 Thread Segher Boessenkool
Hi Xiong Hu, Very sorry I notice this only just now... On Mon, Aug 03, 2020 at 02:58:45PM +0800, luoxhu wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/pr71309.c > @@ -0,0 +1,33 @@ > +/* { dg-do compile } */ > +/* { dg-require-effective-target powerpc_p9vector_ok } */ This needs

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-03 Thread Richard Sandiford
luoxhu writes: > Thanks, the v5 update as comments: > 1. Move const_rhs shift out of loop; > 2. Iterate from int size for read_mode. > > > This patch could optimize(works for char/short/int/void*): > > 6: r119:TI=[r118:DI+0x10] > 7: [r118:DI]=r119:TI > 8: r121:DI=[r118:DI+0x8] > > => > > 6: r119

[PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-02 Thread luoxhu via Gcc-patches
Thanks, the v5 update as comments: 1. Move const_rhs shift out of loop; 2. Iterate from int size for read_mode. This patch could optimize(works for char/short/int/void*): 6: r119:TI=[r118:DI+0x10] 7: [r118:DI]=r119:TI 8: r121:DI=[r118:DI+0x8] => 6: r119:TI=[r118:DI+0x10] 16: r122:DI=r119:TI#