[ARM] backport r266665 to gcc8

Message ID CAKdteObmm01HG=_hZMu8eQ5xE8aU2mbN2qQ_V7E=zdb2Vhgm7A@mail.gmail.com
State New
Headers show
Series
  • [ARM] backport r266665 to gcc8
Related show

Commit Message

Christophe Lyon Nov. 14, 2019, 8:40 a.m.
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.lyon@linaro.org>

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

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

	gcc/testsuite/
	2018-11-30  Sam Tebbs  <sam.tebbs@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.

Comments

Richard Earnshaw (lists) Nov. 15, 2019, 2:27 p.m. | #1
On 14/11/2019 08:40, Christophe Lyon wrote:
> 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

> 


Is there a PR for this?

R.
Christophe Lyon Nov. 15, 2019, 2:36 p.m. | #2
On Fri, 15 Nov 2019 at 15:27, Richard Earnshaw (lists)
<Richard.Earnshaw@arm.com> wrote:
>

> On 14/11/2019 08:40, Christophe Lyon wrote:

> > 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

> >

>

> Is there a PR for this?

>


I don't think so, I couldn't find one. Maybe Sam remembers?


> R.

Patch

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