This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.


On Thu, Jan 19, 2017 at 03:55:36PM +0000, Tamar Christina wrote:
> 
> It seems I can drop even more:

The AArch64 parts of this look fine to me, and based on benchmarking of the
patch they are low risk for high reward (and other targets have had a
vectorized copysign for a while without issue).

However, the testsuite change looks wrong.

> diff --git a/gcc/testsuite/gcc.target/arm/vect-copysignf.c b/gcc/testsuite/gcc.dg/vect/vect-copysignf.c
> similarity index 91%
> rename from gcc/testsuite/gcc.target/arm/vect-copysignf.c
> rename to gcc/testsuite/gcc.dg/vect/vect-copysignf.c
> index 425f1b78af7b07be6929f9e5bc1118ca901bc9ce..dc961d0223399c6e7ee8209d22ca77f6d22dbd70 100644
> --- a/gcc/testsuite/gcc.target/arm/vect-copysignf.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-copysignf.c
> @@ -1,5 +1,5 @@
>  /* { dg-do run } */
> -/* { dg-require-effective-target arm_neon_hw } */
> +/* { dg-require-effective-target arm_neon_hw { target { arm*-*-* } } } */
>  /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
>  /* { dg-add-options "arm_neon" } */

It is a bit redundant as add_options_for_arm_neon will check you are an ARM
target before doing anything, but this dg-add-options could be guarded by
{ target { arm*-*-* } } for clarity. Though, in the gcc.dg/vect/ directory
I'd be surprised if you needed this at all.

I see we have a check_effective_target test for 
{ target { vect_call_copysignf } } . It seems that would be most
appropriate for this test - then you can also drop the effective-target
arm_neon_hw test.

You might want to look at gcc.dg/vect/fast-math-bb-slp-call-1.c - It seems
that gives you most of what you are looking for from this test.

That will mean updating check_effective_target_vect_call_copysignf in
testsuite/lib/target-supports.exp .

Thanks,
James


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]