aarch64: reimplement vqmovn_high* intrinsics using builtins
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 13 Jan 2021 12:14:30 +0000 (12:14 +0000)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 14 Jan 2021 08:36:19 +0000 (08:36 +0000)
commit52cd1cd1b67b10a6d58612bafaded6e8e3a303a1
tree8ee9d8057edc63b3d5f3cd82183370e9dfed5d68
parentc7f1ff01a2342ffd2873528018e5c3650b791d7e
aarch64: reimplement vqmovn_high* intrinsics using builtins

This patch reimplements the saturating-truncate-and-insert-into-high
intrinsics using the appropriate RTL codes and builtins.

gcc/
* config/aarch64/aarch64-simd.md (aarch64_<su>qxtn2<mode>_le):
Define.
(aarch64_<su>qxtn2<mode>_be): Likewise.
(aarch64_<su>qxtn2<mode>): Likewise.
* config/aarch64/aarch64-simd-builtins.def (sqxtn2, uqxtn2):
Define builtins.
* config/aarch64/iterators.md (SAT_TRUNC): Define code_iterator.
(su): Handle ss_truncate and us_truncate.
* config/aarch64/arm_neon.h (vqmovn_high_s16): Reimplement using
builtin.
(vqmovn_high_s32): Likewise.
(vqmovn_high_s64): Likewise.
(vqmovn_high_u16): Likewise.
(vqmovn_high_u32): Likewise.
(vqmovn_high_u64): Likewise.

gcc/testsuite/
* gcc.target/aarch64/narrow_high-intrinsics.c: Update uqxtn2 and
sqxtn2 scan-assembler-times.
gcc/config/aarch64/aarch64-simd-builtins.def
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/arm_neon.h
gcc/config/aarch64/iterators.md
gcc/testsuite/gcc.target/aarch64/narrow_high-intrinsics.c