On Thu, 2 Nov 2023, Andre Vieira (lists) wrote:

> Hi,
> 
> In a previous patch I did most of the work for this, but forgot to change the
> check for number of arguments matching between call and simdclone.  This check
> should accept calls without a mask to be matched against simdclones with mask
> arguments.  I also added tests to verify this feature actually works.
> 
> 
> For the simd-builtins tests I decided to remove the sin (double) simdclone
> which would now be used, because it was inbranch and we enable their use for
> not inbranch.  Given the nature of the test, removing it made more sense, but
> thats not a strong opinion, happy to change.
> 
> Bootstrapped and regression tested on aarch64-unknown-linux-gnu and
> x86_64-pc-linux-gnu.
> 
> OK for trunk?

OK.

I do wonder about the gfortran testsuite adjustments though.

!GCC$ builtin (sin) attributes simd (inbranch)

  ! this should not be using simd clone
  y4 = sin(x8)

previously we wouldn't vectorize this as no notinbranch simd function
is available but now we do since we use the inbranch function for the
notinbranch call.  If that's desired then a better modification of
the test would be to expect vectorization, no?

Richard.

> PS: I'll be away for two weeks from tomorrow, it would be really nice if this
> can go in for gcc-14, otherwise the previous work I did for this won't have
> any actual visible effect :(
> 
> 
> gcc/ChangeLog:
> 
>       * tree-vect-stmts.cc (vectorizable_simd_clone_call): Allow unmasked
>       calls to use masked simdclones.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/vect/vect-simd-clone-20.c: New file.
>       * gfortran.dg/simd-builtins-1.h: Adapt.
>       * gfortran.dg/simd-builtins-6.f90: Adapt.
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to