Hi,

Is it OK to backport r266665 to gcc8 (Ensure dotproduct is only
enabled on armv8 neon) ?
I've noticed unnecessary failure of gcc.target/arm/simd/vdot-compile.c
after I upgraded to recent binutils.

Thanks,

Christophe
[ARM] Ensure dotproduct is only enabled on armv8 neon

2019-11-14  Christophe Lyon  <christophe.l...@linaro.org>

        Backport r266665 from mainline.
        gcc/
        2018-11-30  Sam Tebbs  <sam.te...@arm.com>

        * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.

        gcc/testsuite/
        2018-11-30  Sam Tebbs  <sam.te...@arm.com>

        * gcc.target/arm/neon-dotprod-restriction.c: New file.
        * lib/target-supports.exp
        (check_effective_target_arm_v8_2a_dotprod_neon_ok_nocache): Include
        stdint.h.

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index b12ae38..febd6b0 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -211,7 +211,7 @@ extern tree arm_fp16_type_node;
 #define TARGET_NEON_RDMA (TARGET_NEON && arm_arch8_1)
 
 /* Supports the Dot Product AdvSIMD extensions.  */
-#define TARGET_DOTPROD (TARGET_NEON                                    \
+#define TARGET_DOTPROD (TARGET_NEON && TARGET_VFP5                     \
                        && bitmap_bit_p (arm_active_target.isa,         \
                                        isa_bit_dotprod)                \
                        && arm_arch8_2)
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index e6b84041..857884d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4510,6 +4510,7 @@ proc 
check_effective_target_arm_v8_2a_dotprod_neon_ok_nocache { } {
     foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" 
"-mfloat-abi=hard -mfpu=neon-fp-armv8"} {
         if { [check_no_compiler_messages_nocache \
                   arm_v8_2a_dotprod_neon_ok object {
+            #include <stdint.h>
             #if !defined (__ARM_FEATURE_DOTPROD)
             #error "__ARM_FEATURE_DOTPROD not defined"
             #endif

Reply via email to