Re: [PATCH 3/3] vect: inbranch SIMD clones

2023-02-23 Thread Andrew Stubbs
On 10/02/2023 09:11, Jakub Jelinek wrote: I've tried to fix the -flto thing and I can't figure out how. The problem seems to be that there are two dump files from the two compiler invocations and it scans the wrong one. Aarch64 has the same problem. Two dumps are because it is in a dg-do run te

Re: [PATCH 3/3] vect: inbranch SIMD clones

2023-02-10 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 06, 2023 at 12:20:33PM +, Andrew Stubbs wrote: > > > +/* Ensure the the in-branch simd clones are used on targets that support > > > + them. These counts include all call and definitions. */ > > > + > > > +/* { dg-skip-if "" { x86_64-*-* } { "-flto" } { "" } } */ > > > > Drop l

Re: [PATCH 3/3] vect: inbranch SIMD clones

2023-01-06 Thread Andrew Stubbs
Here's a new version of the patch. On 01/12/2022 14:16, Jakub Jelinek wrote: +void __attribute__((noinline)) You should use noipa attribute instead of noinline on callers which aren't declare simd (on declare simd it would prevent cloning which is essential for the declare simd behavior), so t

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-12-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 01, 2022 at 01:35:38PM +, Andrew Stubbs wrote: > > Maybe better add -ffat-lto-objects to dg-additional-options and drop > > the dg-skip-if (if it works with that, for all similar tests)? > > The tests are already run with -ffat-lto-objects and the test still fails > (pattern found

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-12-01 Thread Andrew Stubbs
On 30/11/2022 15:37, Jakub Jelinek wrote: On Wed, Nov 30, 2022 at 03:17:30PM +, Andrew Stubbs wrote: --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c @@ -0,0 +1,89 @@ +/* { dg-require-effective-target vect_simd_clones } */ +/* { dg-additional-options "-fopenmp-simd -fdump-t

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-11-30 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 30, 2022 at 03:17:30PM +, Andrew Stubbs wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c > @@ -0,0 +1,89 @@ > +/* { dg-require-effective-target vect_simd_clones } */ > +/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */ > +/* { dg-addi

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-11-30 Thread Andrew Stubbs
On 09/09/2022 15:31, Jakub Jelinek wrote: --- a/gcc/tree-if-conv.cc +++ b/gcc/tree-if-conv.cc @@ -1074,13 +1076,19 @@ if_convertible_stmt_p (gimple *stmt, vec refs) tree fndecl = gimple_call_fndecl (stmt); if (fndecl) { + /* We can vectorize some builtins and

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 14, 2022 at 08:09:08AM +, Richard Biener wrote: > Are nested functions a thing for OpenMP? But yes, punt on them > for now. For Fortran certainly because they are part of the language, for C too because they are GNU extension. But declare simd is mostly best effort, so we can at l

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-09-14 Thread Richard Biener via Gcc-patches
On Fri, 9 Sep 2022, Jakub Jelinek wrote: > On Tue, Aug 09, 2022 at 02:23:50PM +0100, Andrew Stubbs wrote: > > > > There has been support for generating "inbranch" SIMD clones for a long > > time, > > but nothing actually uses them (as far as I can see). > > Thanks for working on this. > > Note

Re: [PATCH 3/3] vect: inbranch SIMD clones

2022-09-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 09, 2022 at 02:23:50PM +0100, Andrew Stubbs wrote: > > There has been support for generating "inbranch" SIMD clones for a long time, > but nothing actually uses them (as far as I can see). Thanks for working on this. Note, there is another case where the inbranch SIMD clones could be

[PATCH 3/3] vect: inbranch SIMD clones

2022-08-09 Thread Andrew Stubbs
There has been support for generating "inbranch" SIMD clones for a long time, but nothing actually uses them (as far as I can see). This patch add supports for a sub-set of possible cases (those using mask_mode == VOIDmode). The other cases fail to vectorize, just as before, so there should be n