On Wed, Dec 13, 2017 at 04:36:47PM +0000, Jeff Law wrote: > On 11/17/2017 08:24 AM, Richard Sandiford wrote: > > This patch uses the SVE LASTB instruction to optimise cases in which > > a value produced by the final scalar iteration of a vectorised loop is > > live outside the loop. Previously this situation would stop us from > > using a fully-masked loop. > > > > Tested on aarch64-linux-gnu (with and without SVE), x86_64-linux-gnu > > and powerpc64le-linux-gnu. OK to install? > > > > Richard > > > > > > 2017-11-17 Richard Sandiford <richard.sandif...@linaro.org> > > Alan Hayward <alan.hayw...@arm.com> > > David Sherwood <david.sherw...@arm.com> > > > > gcc/ > > * doc/md.texi (extract_last_@var{m}): Document. > > * optabs.def (extract_last_optab): New optab. > > * internal-fn.def (EXTRACT_LAST): New internal function. > > * internal-fn.c (cond_unary_direct): New macro. > > (expand_cond_unary_optab_fn): Likewise. > > (direct_cond_unary_optab_supported_p): Likewise. > > * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked > > loops using EXTRACT_LAST. > > * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to... > > (extract_last_<mode>): ...this optab. > > (vec_extract<mode><Vel>): Update accordingly. > > > > gcc/testsuite/ > > * gcc.target/aarch64/sve_live_1.c: New test. > > * gcc.target/aarch64/sve_live_1_run.c: Likewise. > Like the last patch, I didn't look at the aarch64 bits. The generic > bits are OK.
OK for the AArch64 parts. Thanks, James