arm: ACLE BFloat16 convert intrinsics
authorDennis Zhang <dennis.zhang@arm.com>
Tue, 3 Mar 2020 13:13:31 +0000 (13:13 +0000)
committerDennis Zhang <dennis.zhang@arm.com>
Tue, 3 Mar 2020 13:13:31 +0000 (13:13 +0000)
commit8e6d0dba166324f4b257329bd4b4ddc2b4522359
tree128f011c82f3d7c24afbeb977c3caddc475d5cfc
parent9b4f00dd3f799337d8b8ef5e79f5a682c8059ab9
arm: ACLE BFloat16 convert intrinsics

This patch is part of a series adding support for Armv8.6-A features.
It implements intrinsics to convert between bfloat16 and float32
formats.

gcc/ChangeLog:

* config/arm/arm_bf16.h (vcvtah_f32_bf16, vcvth_bf16_f32): New.
* config/arm/arm_neon.h (vcvt_f32_bf16, vcvtq_low_f32_bf16): New.
(vcvtq_high_f32_bf16, vcvt_bf16_f32): New.
(vcvtq_low_bf16_f32, vcvtq_high_bf16_f32): New.
* config/arm/arm_neon_builtins.def (vbfcvt, vbfcvt_high): New entries.
(vbfcvtv4sf, vbfcvtv4sf_high): Likewise.
* config/arm/iterators.md (VBFCVT, VBFCVTM): New mode iterators.
(V_bf_low, V_bf_cvt_m): New mode attributes.
* config/arm/neon.md (neon_vbfcvtv4sf<VBFCVT:mode>): New.
(neon_vbfcvtv4sf_highv8bf, neon_vbfcvtsf): New.
(neon_vbfcvt<VBFCVT:mode>, neon_vbfcvt_highv8bf): New.
(neon_vbfcvtbf_cvtmode<mode>, neon_vbfcvtbf): New
* config/arm/unspecs.md (UNSPEC_BFCVT, UNSPEC_BFCVT_HIG): New.

gcc/testsuite/ChangeLog:

* gcc.target/arm/simd/bf16_cvt_1.c: New test.
gcc/ChangeLog
gcc/config/arm/arm_bf16.h
gcc/config/arm/arm_neon.h
gcc/config/arm/arm_neon_builtins.def
gcc/config/arm/iterators.md
gcc/config/arm/neon.md
gcc/config/arm/unspecs.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/simd/bf16_cvt_1.c [new file with mode: 0644]