Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> writes: > Hi, > The attached patch is a fix for PR88839 ported from sve-acle-branch. > OK to commit to trunk ? > > Thanks, > Prathamesh > > 2019-08-21 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> > Richard Sandiford <richard.sandif...@arm.com> > > PR target/88839 > * config/aarch64/aarch64.c (aarch64_evpc_sel): New function. > (aarch64_expand_vec_perm_const_1): Call aarch64_evpc_sel. > > testsuite/ > * gcc.target/aarch64/sve/sel_1.c: New test. > * gcc.target/aarch64/sve/sel_2.c: Likewise. > * gcc.target/aarch64/sve/sel_3.c: Likewise. > * gcc.target/aarch64/sve/sel_4.c: Likewise. > * gcc.target/aarch64/sve/sel_5.c: Likewise. > * gcc.target/aarch64/sve/sel_6.c: Likewise. > > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > index ec60e972f5f..f8d5270b982 100644 > --- a/gcc/config/aarch64/aarch64.c > +++ b/gcc/config/aarch64/aarch64.c > @@ -16632,6 +16632,50 @@ aarch64_evpc_sve_tbl (struct expand_vec_perm_d *d) > return true; > } > > +/* Try to implement D using SVE SEL instruction. */ > + > +static bool > +aarch64_evpc_sel (struct expand_vec_perm_d *d) > +{ > + machine_mode vmode = d->vmode; > + int nunits = GET_MODE_UNIT_SIZE (vmode);
Sorry for not noticing last time, but this should be "unit_size" rather than "nunit". OK with that change, thanks. Richard