]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: [MVE intrinsics] factorize several binary operations
authorChristophe Lyon <christophe.lyon@arm.com>
Tue, 7 Feb 2023 19:26:29 +0000 (19:26 +0000)
committerChristophe Lyon <christophe.lyon@arm.com>
Wed, 3 May 2023 14:58:29 +0000 (16:58 +0200)
commit3fe5a244f55f7764bda5852a45ecbe9b3e0bab81
tree99c0eea5ddbfebf4b59d27cbf0aebfc82120e440
parenta7cbd5f9a8e79741f33f6af9ff8a6d5610fa17c1
arm: [MVE intrinsics] factorize several binary operations

Factorize vabdq, vhaddq, vhsubq, vmulhq, vqaddq_u, vqdmulhq,
vqrdmulhq, vqrshlq, vqshlq, vqsubq_u, vrhaddq, vrmulhq, vrshlq
so that they use the same pattern.

2022-09-08  Christophe Lyon <christophe.lyon@arm.com>

gcc/
* config/arm/iterators.md (MVE_INT_SU_BINARY): New.
(mve_insn): Add vabdq, vhaddq, vhsubq, vmulhq, vqaddq, vqdmulhq,
vqrdmulhq, vqrshlq, vqshlq, vqsubq, vrhaddq, vrmulhq, vrshlq.
(supf): Add VQDMULHQ_S, VQRDMULHQ_S.
* config/arm/mve.md (mve_vabdq_<supf><mode>)
(@mve_vhaddq_<supf><mode>, mve_vhsubq_<supf><mode>)
(mve_vmulhq_<supf><mode>, mve_vqaddq_<supf><mode>)
(mve_vqdmulhq_s<mode>, mve_vqrdmulhq_s<mode>)
(mve_vqrshlq_<supf><mode>, mve_vqshlq_<supf><mode>)
(mve_vqsubq_<supf><mode>, @mve_vrhaddq_<supf><mode>)
(mve_vrmulhq_<supf><mode>, mve_vrshlq_<supf><mode>): Merge into
...
(@mve_<mve_insn>q_<supf><mode>): ... this.
* config/arm/vec-common.md (avg<mode>3_floor, uavg<mode>3_floor)
(avg<mode>3_ceil, uavg<mode>3_ceil): Use gen_mve_q instead of
gen_mve_vhaddq / gen_mve_vrhaddq.
gcc/config/arm/iterators.md
gcc/config/arm/mve.md
gcc/config/arm/vec-common.md