On Wed, Sep 5, 2018 at 1:51 PM <a...@codesourcery.com> wrote: > > > GCN uses V64BImode to represent vector masks in the middle-end, and DImode > bit-masks to represent them in the back-end. These must be converted at > expand > time and the most convenient way is to simply use a SUBREG.
x86 with AVX512 uses SImode in the middle-end as well via the get_mask_mode vectorization target hook. Maybe you can avoid another special-case by piggy-backing on that? > This works fine except that simplify_subreg needs to be able to convert > immediates, mostly for REG_EQUAL and REG_EQUIV, and currently does not know > how > to convert vectors to integers where there is more than one element per byte. > > This patch implements such conversions for the cases that we need. > > I don't know why this is not a problem for other targets that use BImode > vectors, such as ARM SVE, so it's possible I missed some magic somewhere? > > 2018-09-05 Andrew Stubbs <a...@codesourcery.com> > > gcc/ > * simplify-rtx.c (convert_packed_vector): New function. > (simplify_immed_subreg): Recognised Boolean vectors and call > convert_packed_vector. > --- > gcc/simplify-rtx.c | 76 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 76 insertions(+) >