[0/3] OpenMP SIMD routines

Message ID cover.1660051134.git.ams@codesourcery.com
Headers
Series OpenMP SIMD routines |

Message

Andrew Stubbs Aug. 9, 2022, 1:23 p.m. UTC
  This patch series implements OpenMP "simd" routines for amdgcn, and also
adds support for "simd inbranch" routines for amdgcn, x86_64, and
aarch64 (probably, I can't easily test it).

I can approve patch 2 myself, but it depends on patch 1 so I include it
here for context and completeness.

I first tried to use "mask_mode = DImode", for amdgcn, but that does not
produce great results because it ends up generating code to turn the
mask into a vector and then back into the exact same mask, so I have
settled on "mask_mode = VOIDmode", for now (in fact that uses fewer
argument registers in many cases, so maybe it's better anyway).
Additionally, I find that the x86_64 truth vectors cannot always be
converted to the mask types specified by the backend, so I have pulled
that code out completely.

Therefore, this patch includes only "mask_mode == VOIDmode" support,
but remains a step forward towards full SIMD clone support.

I have not included dump-scans in the testcases for aarch64, but the
testcases will still test correctness.  The aarch64 maintainers can very
easily add those scans if they choose.  No other architecture has
backend support for the clones at this time.

OK for mainline (patches 1 & 3)?

Thanks

Andrew

Andrew Stubbs (3):
  omp-simd-clone: Allow fixed-lane vectors
  amdgcn: OpenMP SIMD routine support
  vect: inbranch SIMD clones

 gcc/config/gcn/gcn.cc                         |  63 ++++++++
 gcc/doc/tm.texi                               |   3 +
 gcc/omp-simd-clone.cc                         |  21 ++-
 gcc/target.def                                |   3 +
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-1.c |   2 +
 .../gcc.dg/vect/vect-simd-clone-16.c          |  89 ++++++++++++
 .../gcc.dg/vect/vect-simd-clone-16b.c         |  14 ++
 .../gcc.dg/vect/vect-simd-clone-16c.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-16d.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-16e.c         |  14 ++
 .../gcc.dg/vect/vect-simd-clone-16f.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-17.c          |  89 ++++++++++++
 .../gcc.dg/vect/vect-simd-clone-17b.c         |  14 ++
 .../gcc.dg/vect/vect-simd-clone-17c.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-17d.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-17e.c         |  14 ++
 .../gcc.dg/vect/vect-simd-clone-17f.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-18.c          |  89 ++++++++++++
 .../gcc.dg/vect/vect-simd-clone-18b.c         |  14 ++
 .../gcc.dg/vect/vect-simd-clone-18c.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-18d.c         |  16 +++
 .../gcc.dg/vect/vect-simd-clone-18e.c         |  14 ++
 .../gcc.dg/vect/vect-simd-clone-18f.c         |  16 +++
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-2.c |   2 +
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-3.c |   1 +
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-4.c |   1 +
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-5.c |   1 +
 gcc/testsuite/gcc.dg/vect/vect-simd-clone-8.c |   2 +
 gcc/tree-if-conv.cc                           |  39 ++++-
 gcc/tree-vect-stmts.cc                        | 134 ++++++++++++++----
 30 files changed, 734 insertions(+), 33 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-16b.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-16c.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-16d.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-16e.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-16f.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-17.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-17b.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-17c.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-17d.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-17e.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-17f.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-18.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-18b.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-18c.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-18d.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-18e.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-simd-clone-18f.c