diff mbox series

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

Message ID 20171114155327.GA28748@arm.com
State New
Headers show
Series [ARM] Restrict TARGET_DOTPROD to baseline Armv8.2-a. | expand

Commit Message

Tamar Christina Nov. 14, 2017, 3:53 p.m. UTC
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  <tamar.christina@arm.com>

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

--

Comments

Kyrill Tkachov Nov. 15, 2017, 10:56 a.m. UTC | #1
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  <tamar.christina@arm.com>
>
>         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
>
> --
diff mbox series

Patch

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 \