On Fri, Sep 01, 2017 at 02:20:59PM +0100, Tamar Christina wrote:
> Hi All,
> 
> This patch adds support for the +dotprod extension to AArch64.
> Dot Product requires Adv.SIMD to work and so enables this option
> by default when enabled.
> 
> It is available from ARMv8.2-a and onwards and is enabled by
> default on Cortex-A55 and Cortex-A75.
> 
> Regtested and bootstrapped on aarch64-none-elf and no issues.
> 
> Ok for trunk?

Just a couple of rewordings needed, and then OK.

> gcc/
> 2017-09-01  Tamar Christina  <tamar.christ...@arm.com>
> 
>       * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
>       (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
>       * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add 
> TARGET_DOTPROD.
>       * config/aarch64/aarch64-option-extensions.def (dotprod): New.
>       * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75): Enable 
> TARGET_DOTPROD.
>       (cortex-a75.cortex-a55): Likewise.
>       * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
> 
> -- 
> --- a/gcc/config/aarch64/aarch64.h
> +++ b/gcc/config/aarch64/aarch64.h
> @@ -151,7 +151,8 @@ extern unsigned aarch64_architecture_version;
>  #define AARCH64_FL_F16             (1 << 9)  /* Has ARMv8.2-A FP16 
> extensions.  */
>  /* ARMv8.3-A architecture extensions.  */
>  #define AARCH64_FL_V8_3            (1 << 10)  /* Has ARMv8.3-A features.  */
> -#define AARCH64_FL_RCPC            (1 << 11)  /* Has support for RCpc model. 
>  */
> +#define AARCH64_FL_RCPC       (1 << 11)  /* Has support for RCpc model.  */
> +#define AARCH64_FL_DOTPROD    (1 << 12)  /* Has dot product.  */

Are these correctly formatted with the line above? "Has dot product" is not
very decsriptive.

>  /* ARMv8.3-A features.  */
>  #define TARGET_ARMV8_3       (AARCH64_ISA_V8_3)
>  
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 
> 4cb5836a9da22681d192c3750fc8e5a50024ac10..61fbc087f4974c0eb833c2daa131a2f7269d1b84
>  100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -14271,6 +14271,9 @@ Enable FP16 extension.  This also enables 
> floating-point instructions.
>  Enable the RcPc extension.  This does not change code generation from GCC,
>  but is passed on to the assembler, enabling inline asm statements to use
>  instructions from the RcPc extension.
> +@item dotprod
> +Enable the Dot Product extension.  This also enables Advanced SIMD 
> instructions
> +and allows auto vectorization of dot products to the Dot Product 
> instructions.

I'd drop the text from "and allows" onwards, it isn't very useful for
figuring out exactly what idioms will be supported, and we don't use that
text on other extensions.

Thanks,
James

Reply via email to