Re: [PATCH][GCC][ARM] Restrict TARGET_DOTPROD to baseline Armv8.2-a.

2017-11-15 Thread Kyrill Tkachov

Hi Tamar,

On 14/11/17 15:53, Tamar Christina wrote:

Hi All,

Dot Product is intended to only be available for Armv8.2-a and newer.
While this restriction is reflected in the intrinsics, the patterns
themselves were missing the Armv8.2-a bit.

While GCC would prevent invalid options e.g. `-march=armv8.1-a+dotprod`
we should prevent the pattern from being able to expand at all.

Regtested on arm-none-eabi and no issues.

Ok for trunk?



Ok.
Thanks,
Kyrill


Thanks,
Tamar

gcc/
2017-11-14  Tamar Christina  

* config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.

--




[PATCH][GCC][ARM] Restrict TARGET_DOTPROD to baseline Armv8.2-a.

2017-11-14 Thread Tamar Christina
Hi All,

Dot Product is intended to only be available for Armv8.2-a and newer.
While this restriction is reflected in the intrinsics, the patterns
themselves were missing the Armv8.2-a bit.

While GCC would prevent invalid options e.g. `-march=armv8.1-a+dotprod`
we should prevent the pattern from being able to expand at all.

Regtested on arm-none-eabi and no issues.

Ok for trunk?

Thanks,
Tamar

gcc/
2017-11-14  Tamar Christina  

* config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.

-- 
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 9567f6df73a960ab08b3766fcf3677629658a5ab..b189951c934e327c88cc5893e9629515c9c39013 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -210,10 +210,11 @@ extern tree arm_fp16_type_node;
 /* FPU supports ARMv8.1 Adv.SIMD extensions.  */
 #define TARGET_NEON_RDMA (TARGET_NEON && arm_arch8_1)
 
-/* Supports for Dot Product AdvSIMD extensions.  */
+/* Supports the Dot Product AdvSIMD extensions.  */
 #define TARGET_DOTPROD (TARGET_NEON	\
 			&& bitmap_bit_p (arm_active_target.isa,		\
-	isa_bit_dotprod))
+	isa_bit_dotprod)		\
+			&& arm_arch8_2)
 
 /* FPU supports the floating point FP16 instructions for ARMv8.2 and later.  */
 #define TARGET_VFP_FP16INST \