arm: Auto-vectorization for MVE: vand
authorChristophe Lyon <christophe.lyon@linaro.org>
Thu, 12 Nov 2020 20:16:05 +0000 (20:16 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Thu, 10 Dec 2020 12:13:58 +0000 (12:13 +0000)
commit11a0beff64f71d03fa6614a985b6a870da6cc821
treef99c82ff5331da8be93e309f1ba293b8f741afae
parent4cf70c20cb10acd6fb1016611d05540728176b60
arm: Auto-vectorization for MVE: vand

This patch enables MVE vandq instructions for auto-vectorization.  MVE
vandq insns in mve.md are modified to use 'and' instead of unspec
expression to support and<mode>3.  The and<mode>3 expander is added to
vec-common.md

2020-12-03  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/iterators.md (supf): Remove VANDQ_S and VANDQ_U.
(VANQ): Remove.
(VDQ): Add TARGET_HAVE_MVE condition where relevant.
* config/arm/mve.md (mve_vandq_u<mode>): New entry for vand
instruction using expression 'and'.
(mve_vandq_s<mode>): New expander.
(mve_vaddq_n_f<mode>): Use 'and' code instead of unspec.
* config/arm/neon.md (and<mode>3): Rename into and<mode>3_neon.
* config/arm/predicates.md (imm_for_neon_inv_logic_operand):
Enable for MVE.
* config/arm/unspecs.md (VANDQ_S, VANDQ_U, VANDQ_F): Remove.
* config/arm/vec-common.md (and<mode>3): New expander.

gcc/testsuite/
* gcc.target/arm/simd/mve-vand.c: New test.
gcc/config/arm/iterators.md
gcc/config/arm/mve.md
gcc/config/arm/neon.md
gcc/config/arm/predicates.md
gcc/config/arm/unspecs.md
gcc/config/arm/vec-common.md
gcc/testsuite/gcc.target/arm/simd/mve-vand.c [new file with mode: 0644]