[GCC][PATCH][ARM] Add Bfloat16_t scalar type, vector types and machine modes to ARM...
authorStam Markianos-Wright <stam.markianos-wright@arm.com>
Thu, 16 Jan 2020 15:50:08 +0000 (15:50 +0000)
committerStam Markianos-Wright <stam.markianos-wright@arm.com>
Thu, 16 Jan 2020 15:50:08 +0000 (15:50 +0000)
commit2e87b2f4121fe1d39edb76f4e492dfe327be6a1b
treee8ba655740eabed273c71c6b0891f09942f7274a
parent7b4c373beb31795ac1644e60ee34f6c0d744403d
[GCC][PATCH][ARM] Add Bfloat16_t scalar type, vector types and machine modes to ARM back-end [1/2]

gcc/ChangeLog:

2020-01-16  Stam Markianos-Wright  <stam.markianos-wright@arm.com>

* config.gcc: Add arm_bf16.h.
* config/arm/arm-builtins.c (arm_mangle_builtin_type): Fix comment.
(arm_simd_builtin_std_type): Add BFmode.
(arm_init_simd_builtin_types): Define element types for vector types.
(arm_init_bf16_types): New function.
(arm_init_builtins): Add arm_init_bf16_types function call.
* config/arm/arm-modes.def: Add BFmode and V4BF, V8BF vector modes.
* config/arm/arm-simd-builtin-types.def: Add V4BF, V8BF.
* config/arm/arm.c (aapcs_vfp_sub_candidate):  Add BFmode.
(arm_hard_regno_mode_ok): Add BFmode and tidy up statements.
(arm_vector_mode_supported_p): Add V4BF, V8BF.
(arm_mangle_type):  Add __bf16.
* config/arm/arm.h: Add V4BF, V8BF to VALID_NEON_DREG_MODE,
VALID_NEON_QREG_MODE respectively. Add export arm_bf16_type_node,
arm_bf16_ptr_type_node.
* config/arm/arm.md: Add BFmode to movhf expand, mov pattern and
define_split between ARM registers.
* config/arm/arm_bf16.h: New file.
* config/arm/arm_neon.h: Add arm_bf16.h and Bfloat vector types.
* config/arm/iterators.md: (ANY64_BF, VDXMOV, VHFBF, HFBF, fporbf): New.
(VQXMOV): Add V8BF.
* config/arm/neon.md: Add BF vector types to movhf NEON move patterns.
* config/arm/vfp.md: Add BFmode to movhf patterns.

gcc/testsuite/ChangeLog:

2020-01-16  Stam Markianos-Wright  <stam.markianos-wright@arm.com>

* g++.dg/abi/mangle-neon.C: Add BF16 SIMD types.
* g++.dg/ext/arm-bf16/bf16-mangle-1.C: New test.
* gcc.target/arm/bfloat16_scalar_1_1.c: New test.
* gcc.target/arm/bfloat16_scalar_1_2.c: New test.
* gcc.target/arm/bfloat16_scalar_2_1.c: New test.
* gcc.target/arm/bfloat16_scalar_2_2.c: New test.
* gcc.target/arm/bfloat16_scalar_3_1.c: New test.
* gcc.target/arm/bfloat16_scalar_3_2.c: New test.
* gcc.target/arm/bfloat16_scalar_4.c: New test.
* gcc.target/arm/bfloat16_simd_1_1.c: New test.
* gcc.target/arm/bfloat16_simd_1_2.c: New test.
* gcc.target/arm/bfloat16_simd_2_1.c: New test.
* gcc.target/arm/bfloat16_simd_2_2.c: New test.
* gcc.target/arm/bfloat16_simd_3_1.c: New test.
* gcc.target/arm/bfloat16_simd_3_2.c: New test.
29 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/arm/arm-builtins.c
gcc/config/arm/arm-modes.def
gcc/config/arm/arm-simd-builtin-types.def
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.md
gcc/config/arm/arm_bf16.h [new file with mode: 0644]
gcc/config/arm/arm_neon.h
gcc/config/arm/iterators.md
gcc/config/arm/neon.md
gcc/config/arm/vfp.md
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/mangle-neon.C
gcc/testsuite/g++.dg/ext/arm-bf16/bf16-mangle-1.C [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_1_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_1_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_2_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_2_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_3_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_3_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_scalar_4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_simd_1_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_simd_1_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_simd_2_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_simd_2_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_simd_3_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/bfloat16_simd_3_2.c [new file with mode: 0644]