Go to file
Richard Sandiford c2978b3405 arm: Add missing vec_cmp and vcond patterns
This patch does several things at once:

(1) Add vector compare patterns (vec_cmp and vec_cmpu).

(2) Add vector selects between floating-point modes when the
    values being compared are integers (affects vcond and vcondu).

(3) Add vector selects between integer modes when the values being
    compared are floating-point (affects vcond).

(4) Add standalone vector select patterns (vcond_mask).

(5) Tweak the handling of compound comparisons with zeros.

Unfortunately it proved too difficult (for me) to separate this
out into a series of smaller patches, since everything is so
inter-related.  Defining only some of the new patterns does
not leave things in a happy state.

The handling of comparisons is mostly taken from the vcond patterns.
This means that it remains non-compliant with IEEE: “quiet” comparisons
use signalling instructions.  But that shouldn't matter for floats,
since we require -funsafe-math-optimizations to vectorize for them
anyway.

It remains the case that comparisons and selects aren't implemented
at all for HF vectors.  Implementing those feels like separate work.

gcc/
	PR target/96528
	PR target/97288
	* config/arm/arm-protos.h (arm_expand_vector_compare): Declare.
	(arm_expand_vcond): Likewise.
	* config/arm/arm.c (arm_expand_vector_compare): New function.
	(arm_expand_vcond): Likewise.
	* config/arm/neon.md (vec_cmp<VDQW:mode><v_cmp_result>): New pattern.
	(vec_cmpu<VDQW:mode><VDQW:mode>): Likewise.
	(vcond<VDQW:mode><VDQW:mode>): Require operand 5 to be a register
	or zero.  Use arm_expand_vcond.
	(vcond<V_cvtto><V32:mode>): New pattern.
	(vcondu<VDQIW:mode><VDQIW:mode>): Generalize to...
	(vcondu<VDQW:mode><v_cmp_result): ...this.  Require operand 5
	to be a register or zero.  Use arm_expand_vcond.
	(vcond_mask_<VDQW:mode><v_cmp_result>): New pattern.
	(neon_vc<cmp_op><mode>, neon_vc<cmp_op><mode>_insn): Add "@" marker.
	(neon_vbsl<mode>): Likewise.
	(neon_vc<cmp_op>u<mode>): Reexpress as...
	(@neon_vc<code><mode>): ...this.

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_vect_cond_mixed): Add
	arm neon targets.
	* gcc.target/arm/neon-compare-1.c: New test.
	* gcc.target/arm/neon-compare-2.c: Likewise.
	* gcc.target/arm/neon-compare-3.c: Likewise.
	* gcc.target/arm/neon-compare-4.c: Likewise.
	* gcc.target/arm/neon-compare-5.c: Likewise.
	* gcc.target/arm/neon-vcond-gt.c: Expect comparisons with zero.
	* gcc.target/arm/neon-vcond-ltgt.c: Likewise.
	* gcc.target/arm/neon-vcond-unordered.c: Likewise.
2020-10-01 17:41:15 +01:00
config Fixup config/ChangeLog. 2020-09-10 10:17:51 +02:00
contrib Daily bump. 2020-09-22 00:16:31 +00:00
fixincludes Daily bump. 2020-09-27 00:16:24 +00:00
gcc arm: Add missing vec_cmp and vcond patterns 2020-10-01 17:41:15 +01:00
gnattools
gotools libgo: update to Go1.14beta1 2020-01-21 23:53:22 -08:00
include Daily bump. 2020-09-25 00:16:27 +00:00
INSTALL
intl intl: Unbreak intl build with bison 3 when no regeneration is needed [PR92008] 2020-04-16 11:55:00 +02:00
libada Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libatomic Daily bump. 2020-09-28 00:16:21 +00:00
libbacktrace Daily bump. 2020-09-29 00:16:30 +00:00
libcc1 Daily bump. 2020-09-26 00:16:25 +00:00
libcpp Daily bump. 2020-09-27 00:16:24 +00:00
libdecnumber Daily bump. 2020-07-31 00:16:26 +00:00
libffi Daily bump. 2020-09-25 00:16:27 +00:00
libgcc [RS6000] Adjust gcc asm for power10 2020-10-01 10:34:48 +09:30
libgfortran Daily bump. 2020-09-29 00:16:30 +00:00
libgo libgo: add 32-bit RISC-V (RV32) support 2020-09-30 19:47:48 -07:00
libgomp Daily bump. 2020-10-01 00:16:30 +00:00
libhsail-rt Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libiberty Daily bump. 2020-09-25 00:16:27 +00:00
libitm [RS6000] Adjust gcc asm for power10 2020-10-01 10:34:48 +09:30
libobjc Daily bump. 2020-05-30 00:16:27 +00:00
liboffloadmic Add missing ChangeLog entries. 2020-05-05 16:10:13 +02:00
libphobos Daily bump. 2020-09-11 00:16:28 +00:00
libquadmath Daily bump. 2020-05-30 00:16:27 +00:00
libsanitizer Daily bump. 2020-09-22 00:16:31 +00:00
libssp Daily bump. 2020-05-30 00:16:27 +00:00
libstdc++-v3 libstdc++: Fix test_and_acquire for EABI 2020-10-01 12:54:37 +01:00
libvtv Daily bump. 2020-05-30 00:16:27 +00:00
lto-plugin Daily bump. 2020-09-11 00:16:28 +00:00
maintainer-scripts Daily bump. 2020-05-30 00:16:27 +00:00
zlib Daily bump. 2020-05-30 00:16:27 +00:00
.dir-locals.el
.gitattributes Add *.md diff=md. 2020-01-15 14:29:53 +01:00
.gitignore Add .clang-tidy to git ignored. 2020-06-12 16:03:02 +02:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2020-09-19 00:16:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in MSP430: Add -fno-exceptions multilib 2019-12-11 19:19:50 +00:00
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure configure: Also check C++11 (flags) for ${build} compiler not only for ${host} 2020-08-20 21:59:00 +02:00
configure.ac configure: Also check C++11 (flags) for ${build} compiler not only for ${host} 2020-08-20 21:59:00 +02:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh Do not use HAVE_DOS_BASED_FILE_SYSTEM for Cygwin. 2020-04-17 09:22:51 +02:00
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Add myself for write after approval. 2020-09-18 15:31:46 +01:00
Makefile.def Merge top-level configury changes from gdb 2020-04-09 06:52:55 -06:00
Makefile.in Merge top-level configury changes from gdb 2020-04-09 06:52:55 -06:00
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.