This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [[ARM/AArch64][testsuite] 09/36] Add vsubhn, vraddhn and vrsubhn tests. Split vaddhn.c into vXXXhn.inc and vaddhn.c to share code with other new tests.
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Tejas Belagod <tejas dot belagod at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Jan 2015 17:30:59 +0100
- Subject: Re: [[ARM/AArch64][testsuite] 09/36] Add vsubhn, vraddhn and vrsubhn tests. Split vaddhn.c into vXXXhn.inc and vaddhn.c to share code with other new tests.
- Authentication-results: sourceware.org; auth=none
- References: <1421162314-25779-1-git-send-email-christophe dot lyon at linaro dot org> <1421162314-25779-10-git-send-email-christophe dot lyon at linaro dot org> <54B93739 dot 1050300 at arm dot com>
On 16 January 2015 at 17:07, Tejas Belagod <tejas.belagod@arm.com> wrote:
> On 13/01/15 15:18, Christophe Lyon wrote:
>>
>>
>> * gcc.target/aarch64/advsimd-intrinsics/vXXXhn.inc: New file.
>> * gcc.target/aarch64/advsimd-intrinsics/vraddhn.c: New file.
>> * gcc.target/aarch64/advsimd-intrinsics/vrsubhn.c: New file.
>> * gcc.target/aarch64/advsimd-intrinsics/vsubhn.c: New file.
>> * gcc.target/aarch64/advsimd-intrinsics/vaddhn.c: Use code from
>> vXXXhn.inc.
>>
>> diff --git
>> a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vXXXhn.inc
>> b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vXXXhn.inc
>> new file mode 100644
>> index 0000000..0dbcc92
>> --- /dev/null
>> +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vXXXhn.inc
>> @@ -0,0 +1,50 @@
>> +#define FNNAME1(NAME) exec_ ## NAME
>> +#define FNNAME(NAME) FNNAME1(NAME)
>> +
>> +void FNNAME (INSN_NAME) (void)
>> +{
>> + /* Basic test: vec64=vaddhn(vec128_a, vec128_b), then store the result.
>> */
>> +#define TEST_VADDHN1(INSN, T1, T2, W, W2, N) \
>> + VECT_VAR(vector64, T1, W2, N) = INSN##_##T2##W(VECT_VAR(vector1, T1, W,
>> N), \
>> + VECT_VAR(vector2, T1, W,
>> N)); \
>> + vst1_##T2##W2(VECT_VAR(result, T1, W2, N), VECT_VAR(vector64, T1, W2,
>> N))
>> +
>> +#define TEST_VADDHN(INSN, T1, T2, W, W2, N) \
>> + TEST_VADDHN1(INSN, T1, T2, W, W2, N)
>> +
>
>
> Minor nit. If this is a template file, maybe you should name this macro
> TEST_ADDHN as TEST_XXHN? Just that a template having an INSN name is
> confusing.
Agreed.
>> +VECT_VAR_DECL(expected,poly,8,8) [] = { 0x33, 0x33, 0x33, 0x33,
>> + 0x33, 0x33, 0x33, 0x33 };
>> +VECT_VAR_DECL(expected,poly,16,4) [] = { 0x3333, 0x3333, 0x3333, 0x3333
>> };
>
>
> Though never used, poly seems to have sneaked in here too.
Indeed, sorry for that.
I rushed to have as many tests as possible ready before stage 4, but
obviously I missed a few cleanups.
> Otherwise, LGTM.
>
> Thanks,
> Tejas.
>