[17/n] PR85694: AArch64 support for AVG_FLOOR/CEIL
commit5e153ffe5059424181ee90c28cce1541bf56e21d
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jul 2018 14:27:28 +0000 (3 14:27 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jul 2018 14:27:28 +0000 (3 14:27 +0000)
treec5315e3fa21061fb2d92fcc873cd561def7ca3d8
parent03ea120cd20335283ac4232edfbe1cf0e678ec72
[17/n] PR85694: AArch64 support for AVG_FLOOR/CEIL

This patch adds AArch64 patterns for the new AVG_FLOOR/CEIL operations.
AVG_FLOOR is [SU]HADD and AVG_CEIL is [SU]RHADD.

2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR tree-optimization/85694
* config/aarch64/iterators.md (HADD, RHADD): New int iterators.
(u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
UNSPEC_URHADD.
* config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
(<u>avg<mode>3_ceil): New patterns.

gcc/testsuite/
PR tree-optimization/85694
* lib/target-supports.exp (check_effective_target_vect_avg_qi):
Return true for AArch64 without SVE.
* gcc.target/aarch64/vect_hadd_1.h: New file.
* gcc.target/aarch64/vect_shadd_1.c: New test.
* gcc.target/aarch64/vect_srhadd_1.c: Likewise.
* gcc.target/aarch64/vect_uhadd_1.c: Likewise.
* gcc.target/aarch64/vect_urhadd_1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262347 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/iterators.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/vect_hadd_1.h [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_shadd_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_srhadd_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_uhadd_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_urhadd_1.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp