aarch64: intrinsics extract half of bf16 vector
authorDennis Zhang <denzha01@e124712.cambridge.arm.com>
Tue, 3 Nov 2020 16:56:02 +0000 (16:56 +0000)
committerDennis Zhang <denzha01@e124712.cambridge.arm.com>
Tue, 3 Nov 2020 16:56:02 +0000 (16:56 +0000)
commit3553c658533e430b232997bdfd97faf6606fb102
tree366d78e9ad002496d287d08adc51592a9e584d0a
parentcee45e49126d18fe2dc8efc83c190662cd41914d
aarch64: intrinsics extract half of bf16 vector

This patch implements ACLE intrinsics vget_low_bf16 and vget_high_bf16
to extract lower or higher half from a bfloat16x8 vector. The
vget_high_bf16 is done by 'dup' instruction. The vget_low_bf16 is just
to return the lower half of a vector register. Tests include both big-
and little-endian cases.

gcc/ChangeLog:

2020-11-03  Dennis Zhang  <dennis.zhang@arm.com>

* config/aarch64/aarch64-simd-builtins.def (vget_lo_half): New entry.
(vget_hi_half): Likewise.
* config/aarch64/aarch64-simd.md (aarch64_vget_lo_halfv8bf): New entry.
(aarch64_vget_hi_halfv8bf): Likewise.
* config/aarch64/arm_neon.h (vget_low_bf16): New intrinsic.
(vget_high_bf16): Likewise.

gcc/testsuite/ChangeLog

* gcc.target/aarch64/advsimd-intrinsics/bf16_get.c: New test.
* gcc.target/aarch64/advsimd-intrinsics/bf16_get-be.c: New test.
gcc/ChangeLog
gcc/config/aarch64/aarch64-simd-builtins.def
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/arm_neon.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_get-be.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/bf16_get.c [new file with mode: 0644]