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

2020-07-23 Thread luoxhu via Gcc-patches
On 2020/7/23 04:30, Richard Sandiford wrote: > > I now realise the reason is that the starting mode is too wide. > I think we should fix that by doing: > >FOR_EACH_MODE_IN_CLASS (new_mode_iter, MODE_INT) > { >… > > and then add: > >if (maybe_lt (GET_MODE_SIZE (new_mo

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

2020-07-22 Thread Richard Sandiford
Richard Sandiford writes: > luoxhu writes: >> Hi, >> >> On 2020/7/22 19:05, Richard Sandiford wrote: >>> This wasn't really what I meant. Using subregs is fine, but I was >>> thinking of: >>> >>>/* Also try a wider mode if the necessary punning is either not >>> desirable or not po

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

2020-07-22 Thread Richard Sandiford
gument to simplify_gen_subreg above). It shouldn't be necessary to use smallest_int_mode_for_size to find a different mode. That's also why the multiple_p is the way round it is above. The idea is that the shift amount must be a multiple of the size of the outer mode (here new_mode) in or

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

2020-07-22 Thread luoxhu via Gcc-patches
_for_size (shift)" to get rhs_subreg, otherwise it will return NULL if new_mode is equal to store_mode. Lastly, move the BITS_PER_UNIT after multiple_p as it still need generate shift_seq for other circumstances. :) [PATCH v3] dse: Remove partial load after full store for high part access[P