[17/n] PR85694: AArch64 support for AVG_FLOOR/CEIL
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 3 Jul 2018 14:27:28 +0000 (14:27 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 3 Jul 2018 14:27:28 +0000 (14:27 +0000)
commit42addb5adfbe872a7dd086db04df3f517a61f1e8
treec5315e3fa21061fb2d92fcc873cd561def7ca3d8
parent25d861fef34b44f720de813410f29096d4406b02
[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.

From-SVN: r262347
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