6c3ce63b04
This patch adds support for permuting unpacked SVE vectors using: - DUP - EXT - REV[BHW] - REV - TRN[12] - UZP[12] - ZIP[12] This involves rewriting the REV[BHW] permute code so that the inputs and outputs of the insn pattern have the same mode as the vectors being permuted. This is different from the ACLE form, where the reversal happens within individual elements rather than within groups of multiple elements. The patch does not add a conditional version of REV[BHW]. I'll come back to that once we have partial-vector comparisons and selects. The patch is really just enablement, adding an extra tool to the toolbox. It doesn't bring any significant vectorisation opportunities on its own. However, the patch does have one artificial example that is now vectorised in a better way than before. gcc/ * config/aarch64/aarch64-modes.def (VNx2BF, VNx4BF): Adjust nunits and alignment based on the current VG. * config/aarch64/iterators.md (SVE_ALL, SVE_24, SVE_2, SVE_4): Add partial SVE BF modes. (UNSPEC_REVBHW): New unspec. (Vetype, Vesize, Vctype, VEL, Vel, vwcore, V_INT_CONTAINER) (v_int_container, VPRED, vpred): Handle partial SVE BF modes. (container_bits, Vcwtype): New mode attributes. * config/aarch64/aarch64-sve.md (@aarch64_sve_revbhw_<SVE_ALL:mode><PRED_HSD:mode>): New pattern. (@aarch64_sve_dup_lane<mode>): Extended from SVE_FULL to SVE_ALL. (@aarch64_sve_rev<mode>, @aarch64_sve_<perm_insn><mode>): Likewise. (@aarch64_sve_ext<mode>): Likewise. * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle E_VNx2BFmode and E_VNx4BFmode. (aarch64_evpc_rev_local): Base the analysis on the container size instead of the element size. Use the new aarch64_sve_revbhw patterns for SVE. (aarch64_evpc_dup): Handle partial SVE data modes. Use the container size instead of the element size when applying the SVE immediate limit. Fix a previously incorrect bounds check. (aarch64_expand_vec_perm_const_1): Handle partial SVE data modes. gcc/testsuite/ * gcc.target/aarch64/sve/dup_lane_2.c: New test. * gcc.target/aarch64/sve/dup_lane_3.c: Likewise. * gcc.target/aarch64/sve/ext_4.c: Likewise. * gcc.target/aarch64/sve/rev_2.c: Likewise. * gcc.target/aarch64/sve/revhw_1.c: Likewise. * gcc.target/aarch64/sve/revhw_2.c: Likewise. * gcc.target/aarch64/sve/slp_perm_8.c: Likewise. * gcc.target/aarch64/sve/trn1_2.c: Likewise. * gcc.target/aarch64/sve/trn2_2.c: Likewise. * gcc.target/aarch64/sve/uzp1_2.c: Likewise. * gcc.target/aarch64/sve/uzp2_2.c: Likewise. * gcc.target/aarch64/sve/zip1_2.c: Likewise. * gcc.target/aarch64/sve/zip2_2.c: Likewise. |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.