Hi,

After also testing on the gcc-7 branch I committed a backport of r269499 including the testism fix 269596 to gcc-7 branch in r269647.

Cheers,
Andre

gcc/ChangeLog:
2019-03-13  Andre Vieira  <andre.simoesdiasvie...@arm.com>

        Backport from mainline
        2019-03-08  Andre Vieira  <andre.simoesdiasvie...@arm.com>

        * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
        requirement.

gcc/testsuite/ChangeLog:
2019-03-13  Andre Vieira  <andre.simoesdiasvie...@arm.com>

        Backport from mainline
        2019-03-08  Andre Vieira  <andre.simoesdiasvie...@arm.com>

        * gcc.target/arm/f16_f64_conv_no_dp.c: New test.

        Backport from mainline
        2019-03-11  Christophe Lyon  <christophe.l...@linaro.org>

        * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective
        target.

On 12/03/2019 14:54, Andre Vieira (lists) wrote:
Hi,

Thanks Christophe! I have committed a backport of r269499 including the testism fix r269596 to gcc-8 branch in r269613.

gcc/ChangeLog:
2019-03-12  Andre Vieira  <andre.simoesdiasvie...@arm.com>

         Backport from mainline
         2019-03-08  Andre Vieira  <andre.simoesdiasvie...@arm.com>

         * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
         requirement.

gcc/testsuite/ChangeLog:
2019-03-12  Andre Vieira  <andre.simoesdiasvie...@arm.com>

         Backport from mainline
         2019-03-08  Andre Vieira  <andre.simoesdiasvie...@arm.com>

         * gcc.target/arm/f16_f64_conv_no_dp.c: New test.

         Backport from mainline
         2019-03-11  Christophe Lyon  <christophe.l...@linaro.org>

         * gcc.target/arm/f16_f64_conv_no_dp.c: Add arm_fp16_ok effective
         target.

On 11/03/2019 20:50, Ramana Radhakrishnan wrote:
Nope, just do it after testing it and adjust with Christophes follow up

R

On Mon, 11 Mar 2019, 10:36 Andre Vieira (lists), <andre.simoesdiasvie...@arm.com <mailto:andre.simoesdiasvie...@arm.com>> wrote:

    Hi,

    Any objections to me backporting this to GCC 8 and 7?

    Cheers,
    Andre

    On 08/03/2019 17:30, Andre Vieira (lists) wrote:
     > Hi,
     >
     > vcvtb.f16.f64 and vcvtb.f64.f16 were being made available even
    for FPUs
     > that do not support double precision.  This patch fixes that.
     >
     > Regression tested for arm-none-eabi.
     >
     > Committed in r269499.
     >
     > Cheers,
     > Andre
     >
     > gcc/ChangeLog:
     > 2019-03-08  Andre Vieira  <andre.simoesdiasvie...@arm.com
    <mailto:andre.simoesdiasvie...@arm.com>>
     >
     >          * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add
    TARGET_VFP_DOUBLE
     >          requirement.
     >
     > gcc/testsuite/ChangeLog:
     >
     > 2019-03-08  Andre Vieira  <andre.simoesdiasvie...@arm.com
    <mailto:andre.simoesdiasvie...@arm.com>>
     >
     >          * gcc.target/arm/f16_f64_conv_no_dp.c: New test.

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 68a6fa56c7cc3cf1c369156d6b2f68f8997ed58b..d89b6d345f40c83fd525ff50dd5fcdbe74746b0b 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -186,7 +186,7 @@ extern tree arm_fp16_type_node;
 /* FPU supports converting between HFmode and DFmode in a single hardware
    step.  */
 #define TARGET_FP16_TO_DOUBLE						\
-  (TARGET_HARD_FLOAT && (TARGET_FP16 && TARGET_VFP5))
+  (TARGET_HARD_FLOAT && TARGET_FP16 && TARGET_VFP5 && TARGET_VFP_DOUBLE)
 
 /* FPU supports fused-multiply-add operations.  */
 #define TARGET_FMA (bitmap_bit_p (arm_active_target.isa, isa_bit_VFPv4))
diff --git a/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c
new file mode 100644
index 0000000000000000000000000000000000000000..2620e57000425665c3891f7965f00d2c7645781b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/f16_f64_conv_no_dp.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_fp16_ok } */
+/* { dg-skip-if "do not override fpu" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv5-sp-d16" } } */
+/* { dg-skip-if "do not disable fpu" { *-*-* } { "-mfloat-abi=soft" } { * } } */
+/* { dg-skip-if "do not override fp16-format" { *-*-* } { "-mfp16-format=*" } { "-mfp16-format=ieee" } } */
+/* { dg-options "-O1 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee" } */
+
+__fp16 foo (double a)
+{
+  return a;
+}
+
+double bar (__fp16 a)
+{
+  return a;
+}

Reply via email to