Re: [PATCH v6] Add QI vector mode support to by-pieces for memset

2021-07-30 Thread H.J. Lu via Gcc-patches
On Fri, Jul 30, 2021 at 8:40 AM Richard Sandiford wrote: > > "H.J. Lu via Gcc-patches" writes: > > +/* Callback routine for store_by_pieces. Read GET_MODE_BITSIZE (MODE) > > + bytes from constant string DATA + OFFSET and return it as target > > + constant. If PREV isn't nullptr, it has the

Re: [PATCH v6] Add QI vector mode support to by-pieces for memset

2021-07-30 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > +/* Callback routine for store_by_pieces. Read GET_MODE_BITSIZE (MODE) > + bytes from constant string DATA + OFFSET and return it as target > + constant. If PREV isn't nullptr, it has the RTL info from the > + previous iteration. */ > > +rtx > +builti

[PATCH v6] Add QI vector mode support to by-pieces for memset

2021-07-30 Thread H.J. Lu via Gcc-patches
1. Replace scalar_int_mode with fixed_size_mode in the by-pieces infrastructure to allow non-integer mode. 2. Rename widest_int_mode_for_size to widest_fixed_size_mode_for_size to return QI vector mode for memset. 3. Add op_by_pieces_d::smallest_fixed_size_mode_for_size to return the smallest integ