[PATCH 3/15][ARM] Add V8HFmode and float16x8_t type

Kyrill Tkachov kyrylo.tkachov@arm.com
Wed Jul 29 15:12:00 GMT 2015


Hi Alan,

On 28/07/15 12:24, Alan Lawrence wrote:
> This is a respin of https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00477.html.
> The only change is to publish float16x8_t only if we actually have a scalar
> __fp16 type.
>
> gcc/ChangeLog:
>
>       * config/arm/arm.h (VALID_NEON_QREG_MODE): Add V8HFmode.
>
>       * config/arm/arm.c (arm_vector_mode_supported_p): Support V8HFmode.
>
>       * config/arm/arm-builtins.c (v8hf_UP): New.
>       (arm_init_simd_builtin_types): Initialise Float16x8_t.
>
>       * config/arm/arm-simd-builtin-types.def (Float16x8_t): New.
>
>       * config/arm/arm_neon.h (float16x8_t): New typedef.

@@ -822,6 +823,7 @@ arm_init_simd_builtin_types (void)
       we have a scalar __fp16 type.  */
    arm_simd_types[Float16x4_t].eltype = arm_simd_floatHF_type_node;
    arm_simd_types[Float32x2_t].eltype = float_type_node;
+  arm_simd_types[Float16x8_t].eltype = arm_simd_floatHF_type_node;
    arm_simd_types[Float32x4_t].eltype = float_type_node;
  
Please put the Float16x8_t intialisation right after the Float16x4_t one.

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 6e074ea3d3910e1d7abf0299f441973259023606..0faa46ceea51ef6c524c8ff8c063f329a524c11d 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -26251,7 +26251,8 @@ arm_vector_mode_supported_p (machine_mode mode)
  {
    /* Neon also supports V2SImode, etc. listed in the clause below.  */
    if (TARGET_NEON && (mode == V2SFmode || mode == V4SImode || mode == V8HImode
-      || mode == V4HFmode || mode == V16QImode || mode == V4SFmode || mode == V2DImode))
+      || mode ==V4HFmode || mode == V16QImode || mode == V4SFmode
+      || mode == V2DImode || mode == V8HFmode))

Space between == and V4HFmode.

Ok with those changes.

Thanks,
Kyrill



More information about the Gcc-patches mailing list