[AArch64] Refactor vector max and min RTL and builtins.

gcc/
	* config/aarch64/aarch64-simd-builtins.def
	(reduc_smax_): New.
	(reduc_smin_): Likewise.
	(reduc_umax_): Likewise.
	(reduc_umin_): Likewise.
	(reduc_smax_nan_): Likewise.
	(reduc_smin_nan_): Likewise.
	(fmax): Remove.
	(fmin): Likewise.
	(smax): Update for V2SF, V4SF and V2DF modes.
	(smin): Likewise.
	(smax_nan): New.
	(smin_nan): Likewise.
	* config/aarch64/aarch64-simd.md (<maxmin><mode>3): Rename to...
	(<su><maxmin><mode>3): ...This, refactor.
	(s<maxmin><mode>3): New.
	(<maxmin_uns><mode>3): Likewise.
	(reduc_<maxmin_uns>_<mode>): Refactor.
	(reduc_<maxmin_uns>_v4sf): Likewise.
	(reduc_<maxmin_uns>_v2si): Likewise.
	(aarch64_<fmaxmin><mode>: Remove.
	* config/aarch64/arm_neon.h (vmax<q>_f<32,64>): Rewrite to use
	new builtin names.
	(vmin<q>_f<32,64>): Likewise.
	* config/iterators.md (unspec): Add UNSPEC_FMAXNMV, UNSPEC_FMINNMV.
	(FMAXMIN): New.
	(su): Add mappings for smax, smin, umax, umin.
	(maxmin): New.
	(FMAXMINV): Add UNSPEC_FMAXNMV, UNSPEC_FMINNMV.
	(FMAXMIN): Rename as...
	(FMAXMIN_UNS): ...This.
	(maxminv): Remove.
	(fmaxminv): Likewise.
	(fmaxmin): Likewise.
	(maxmin_uns): New.
	(maxmin_uns_op): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198497 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Fold max and min reduction builtins to tree.

gcc/
	* config/aarch64/aarch64-builtins
	(aarch64_gimple_fold_builtin): Fold reduc_<su><maxmin>_ builtins.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198498 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Rewrite v<max,min><nm><q><v>_<sfu><8, 16, 32, 64> intrinsics using builtins.

gcc/
	* config/aarch64/arm_neon.h
	(v<max,min><nm><q><v>_<sfu><8, 16, 32, 64>): Rewrite using builtins.

gcc/testsuite/
	* gcc.target/aarch64/vect-vmaxv.c: New.
	* gcc.target/aarch64/vect-vfmaxv.c: Likewise.




git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198499 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Refactor reduc_<su>plus patterns.

gcc/
	* config/aarch64/aarch64-builtins.c
	(aarch64_gimple_fold_builtin.c): Fold more modes for reduc_splus_.
	* config/aarch64/aarch64-simd-builtins.def
	(reduc_splus_): Add new modes.
	(reduc_uplus_): New.
	* config/aarch64/aarch64-simd.md (aarch64_addvv4sf): Remove.
	(reduc_uplus_v4sf): Likewise.
	(reduc_splus_v4sf): Likewise.
	(aarch64_addv<mode>): Likewise.
	(reduc_uplus_<mode>): Likewise.
	(reduc_splus_<mode>): Likewise.
	(aarch64_addvv2di): Likewise.
	(reduc_uplus_v2di): Likewise.
	(reduc_splus_v2di): Likewise.
	(aarch64_addvv2si): Likewise.
	(reduc_uplus_v2si): Likewise.
	(reduc_splus_v2si): Likewise.
	(reduc_<sur>plus_<mode>): New.
	(reduc_<sur>plus_v2di): Likewise.
	(reduc_<sur>plus_v2si): Likewise.
	(reduc_<sur>plus_v4sf): Likewise.
	(aarch64_addpv4sf): Likewise.
	* config/aarch64/arm_neon.h
	(vaddv<q>_<s,u,f><8, 16, 32, 64): Rewrite using builtins.
	* config/aarch64/iterators.md (unspec): Remove UNSPEC_ADDV,
	add UNSPEC_SADDV, UNSPEC_UADDV.
	(SUADDV): New.
	(sur): Add UNSPEC_SADDV, UNSPEC_UADDV.

gcc/testsuite/
	* gcc.target/aarch64/vect-vaddv.c: New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198500 138bc75d-0d04-0410-961f-82ee72b054a4