![]() In this wrong-code bug we combine a VSUB.I8 and a VABS.S8 into a VABD.S8 instruction . This combination is not valid for integer operands because in the VABD instruction the semantics are that the difference is computed in notionally infinite precision and the absolute difference is computed on that, whereas for a VSUB.I8 + VABS.S8 sequence the VSUB operation will perform any wrapping that's needed for the 8-bit signed type before the VABS gets its hands on it. This leads to the wrong-code in the PR where the expected sequence from the intrinsics: VSUB + VABS of two vectors {-100, -100, -100...}, {100, 100, 100...} gives a result of {56, 56, 56...} (-100 - 100) but GCC optimises it into a single VABD of {-100, -100, -100...}, {100, 100, 100...} which produces a result of {200, 200, 200...} The transformation is still valid for floating-point operands, which is why it was added in the first place I believe (r178817) but this patch disables it for integer operands. The HFmode variants though only exist for TARGET_NEON_FP16INST, so this patch adds the appropriate guards to the new mode iterator Bootstrapped and tested on arm-none-linux-gnueabihf. PR target/83687 * config/arm/iterators.md (VF): New mode iterator. * config/arm/neon.md (neon_vabd<mode>_2): Use the above. Remove integer-related logic from pattern. (neon_vabd<mode>_3): Likewise. * gcc.target/arm/neon-combine-sub-abs-into-vabd.c: Delete integer tests. * gcc.target/arm/pr83687.c: New test. From-SVN: r256696 |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libmpx | ||
libobjc | ||
liboffloadmic | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
README | ||
symlink-tree | ||
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.