This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64][PATCH 2/7] Add sqrdmah, sqrdmsh instructions.
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Matthew Wahab <matthew dot wahab at foss dot arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Oct 2015 11:18:09 +0000
- Subject: Re: [AArch64][PATCH 2/7] Add sqrdmah, sqrdmsh instructions.
- Authentication-results: sourceware.org; auth=none
- References: <562A2519 dot 3020102 at foss dot arm dot com> <562A25C8 dot 7010003 at foss dot arm dot com>
On Fri, Oct 23, 2015 at 01:19:20PM +0100, Matthew Wahab wrote:
> The ARMv8.1 architecture extension adds two Adv.SIMD instructions,
> sqrdmlah and sqrdmlsh. This patch adds the instructions to the
> aarch64-simd patterns, making them conditional on the TARGET_SIMD_RDMA
> feature macro introduced in the previous patch.
>
> The instructions patterns are defined using unspec expressions, so that
> they are only generated through builtins added by this patch series. To
> simplify the definition, iterators SQRDMLAH and rdma_as are added, to
> iterate over the add (sqrdmlah) and subtract (sqrdmlsh) forms of the
> instructions.
>
> Tested the series for aarch64-none-linux-gnu with native bootstrap and
> make check on an ARMv8 architecture. Also tested aarch64-none-elf with
> cross-compiled check-gcc on an ARMv8.1 emulator.
>
> Ok for trunk?
> Matthew
OK with the name of the iterator fixed to something more clear as to what
you are iterating over.
> gcc/
> 2015-10-23 Matthew Wahab <matthew.wahab@arm.com>
>
> * config/aarch64/aarch64-simd.md
> (aarch64_sqmovun<mode>): Fix some white-space.
> (aarch64_<sur>qmovun<mode>): Likewise.
> (aarch64_sqrdml<SQRDMLAH:rdma_as>h<mode>): New.
> (aarch64_sqrdml<SQRDMLAH:rdma_as>h_lane<mode>): New.
> (aarch64_sqrdml<SQRDMLAH:rdma_as>h_laneq<mode>): New.
> * config/aarch64/iterators.md (UNSPEC_SQRDMLAH): New.
> (UNSPEC_SQRDMLSH): New.
> (SQRDMLAH): New.
> (rdma_as): New.
>
> diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
> index 964f8f1..409ba7b 100644
> --- a/gcc/config/aarch64/iterators.md
> +++ b/gcc/config/aarch64/iterators.md
> @@ -303,6 +303,8 @@
> UNSPEC_PMULL2 ; Used in aarch64-simd.md.
> UNSPEC_REV_REGLIST ; Used in aarch64-simd.md.
> UNSPEC_VEC_SHR ; Used in aarch64-simd.md.
> + UNSPEC_SQRDMLAH ; Used in aarch64-simd.md.
> + UNSPEC_SQRDMLSH ; Used in aarch64-simd.md.
> ])
>
> ;; -------------------------------------------------------------------
> @@ -932,6 +934,8 @@
> UNSPEC_SQSHRN UNSPEC_UQSHRN
> UNSPEC_SQRSHRN UNSPEC_UQRSHRN])
>
> +(define_int_iterator SQRDMLAH [UNSPEC_SQRDMLAH UNSPEC_SQRDMLSH])
> +
This name does not make it clear that you will iterate over an "A" and an
"S" form. I'd like to see a clearer naming choice, RDMAS? SQRDMLHADDSUB? etc.
Thanks,
James