Find a file
Richard Sandiford f22d79731a [AArch64] Use UNSPEC_MERGE_PTRUE for comparisons
This patch rewrites the SVE comparison handling so that it uses
UNSPEC_MERGE_PTRUE for comparisons that are known to be predicated
on a PTRUE, for consistency with other patterns.  Specific unspecs
are then only needed for truly predicated floating-point comparisons,
such as those used in the expansion of UNEQ for flag_trapping_math.

The patch also makes sure that the comparison expanders attach
a REG_EQUAL note to instructions that use UNSPEC_MERGE_PTRUE,
so passes can use that as an alternative to the unspec pattern.
(This happens automatically for optabs.  The problem was that
this code emits instruction patterns directly.)

No specific benefit on its own, but it lays the groundwork for
the next patch.

2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
	* config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
	(UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
	(SVE_INT_CMP, SVE_FP_CMP): New code iterators.
	(cmp_op, sve_imm_con): New code attributes.
	(SVE_COND_INT_CMP, imm_con): Delete.
	(cmp_op): Remove above unspecs from int attribute.
	* config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
	to...
	(*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
	comparison-specific unspecs.
	(*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
	(*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
	(*vec_cmp<cmp_op>_<mode>_cc): Rename to...
	(*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
	(*vec_fcm<cmp_op><mode>): Rename to...
	(*fcm<cmp_op><mode>): ...this and adjust likewise.
	(*vec_fcmuo<mode>): Rename to...
	(*fcmuo<mode>): ...this and adjust likewise.
	(*pred_fcm<cmp_op><mode>): New pattern.
	* config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
	(aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
	functions.
	(aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
	and UNORDERED.
	(aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
	(aarch64_emit_sve_predicated_cond): New function.
	(aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
	(aarch64_emit_unspec_cond_or): Replace with...
	(aarch64_emit_sve_or_conds): ...this new function.  Use
	aarch64_emit_sve_ptrue_op for the individual comparisons and
	aarch64_emit_binop to OR them together.
	(aarch64_emit_inverted_unspec_cond): Replace with...
	(aarch64_emit_sve_inverted_cond): ...this new function.  Use
	aarch64_emit_sve_ptrue_op for the comparison and
	aarch64_emit_unop to invert the result.
	(aarch64_expand_sve_vec_cmp_float): Update after the above
	changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.

From-SVN: r260029
2018-05-08 09:56:29 +00:00
config re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-05-08 08:50:33 +00:00
contrib re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-05-08 08:50:33 +00:00
fixincludes re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
gcc [AArch64] Use UNSPEC_MERGE_PTRUE for comparisons 2018-05-08 09:56:29 +00:00
gnattools Update copyright years. 2018-01-03 11:03:58 +01:00
gotools re PR go/85630 (GCC 8.1.0: Filesystem pollution during build: .cache dir in $HOME) 2018-05-04 16:23:51 +00:00
include ansidecl.h (ATTRIBUTE_NONSTRING): Define. 2018-05-02 19:21:45 +09:30
INSTALL
intl Require ngettext in test of system gettext implementation 2017-11-07 15:24:01 +10:30
libada re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
libatomic [testsuite] Add scan-ltrans-tree-dump 2018-05-02 12:16:32 +00:00
libbacktrace Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libcc1 PR c++/69560 - wrong alignof(double) on x86. 2018-04-23 16:49:38 -04:00
libcpp Regenerate .pot files. 2018-04-23 21:27:02 +01:00
libdecnumber Do not use bit and for conjunction of predicates (PR c/81272). 2018-02-19 18:29:20 +00:00
libffi libffi PowerPC64 ELFv1 fp arg fixes 2018-05-04 23:17:11 +09:30
libgcc config.host (x86_64-*-rtems*): Build crti.o and crtn.o. 2018-05-07 16:32:09 +00:00
libgfortran re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
libgo cmd/go: on AIX, pass -X64 first when invoking ar 2018-05-04 17:51:46 +00:00
libgomp [openacc, testsuite] Allow installed testing of libgomp to find gomp-constants.h 2018-05-07 11:33:45 +00:00
libhsail-rt [BRIGFE] phsa-specific optimizations 2018-05-04 19:43:57 +00:00
libiberty argv.c (expandargv): Fix memory leak for expanded arguments. 2018-04-30 12:00:49 -06:00
libitm [testsuite] Add scan-ltrans-tree-dump 2018-05-02 12:16:32 +00:00
libmpx Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libobjc Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
liboffloadmic re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
libquadmath Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libsanitizer If someone has access to a 64-bit mips-linux system to test this (with the obvious edit), that'd be really nice. 2018-04-26 01:16:47 +00:00
libssp Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libstdc++-v3 Document -lstdc++fs requirement for std::filesystem 2018-05-07 20:17:16 +01:00
libvtv [testsuite] Add scan-ltrans-tree-dump 2018-05-02 12:16:32 +00:00
lto-plugin re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
maintainer-scripts re PR other/85622 (gcc-8.1.0/NEWS says it's not released yet) 2018-05-03 11:29:39 +02:00
zlib re PR bootstrap/79771 (in-tree zlib breaks build) 2017-03-14 23:01:23 -06:00
.dir-locals.el
.gitattributes
.gitignore .gitignore: Ignore in-tree prerequisites. 2016-09-09 17:20:55 -04:00
ABOUT-NLS
ChangeLog Add the Netronome Flow Processor (nfp) as a build target to the top-level configure.ac file. 2018-05-01 15:26:51 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
config.guess config.guess: Import latest version. 2018-01-03 15:25:18 +11:00
config.rpath
config.sub config.guess: Import latest version. 2018-01-03 15:25:18 +11:00
configure Add the Netronome Flow Processor (nfp) as a build target to the top-level configure.ac file. 2018-05-01 15:26:51 +00:00
configure.ac Add the Netronome Flow Processor (nfp) as a build target to the top-level configure.ac file. 2018-05-01 15:26:51 +00:00
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 MAINTAINERS (mips): Remove myself as MIPS maintainer. 2018-04-25 18:40:04 -04:00
Makefile.def Remove Cilk Plus support. 2017-11-28 11:35:37 +01:00
Makefile.in re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-04-30 08:18:03 +00:00
Makefile.tpl re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-04-30 08:18:03 +00:00
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.