openmp: Fix reduction clause handling on teams distribute simd [PR99928]
authorJakub Jelinek <jakub@redhat.com>
Tue, 25 May 2021 09:07:01 +0000 (11:07 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 25 May 2021 09:07:01 +0000 (11:07 +0200)
commit3a81735c1c8cea4323dcb912b7a8879b54aa3bc0
treeccc0b37c2911dbc11dde0df1f06666332e66eee2
parent9aecba04f4da35bd2bc7c2de76892e88cc7421ac
openmp: Fix reduction clause handling on teams distribute simd [PR99928]

When a directive isn't combined with worksharing-loop, it takes much
simpler clause splitting path for reduction, and that one was missing
handling of teams when combined with simd.

2021-05-25  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/99928
gcc/c-family/
* c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
combined with simd and not with taskloop or for.
gcc/testsuite/
* c-c++-common/gomp/pr99928-8.c: Remove xfails from omp teams r21 and
r28 checks.
* c-c++-common/gomp/pr99928-9.c: Likewise.
* c-c++-common/gomp/pr99928-10.c: Likewise.
libgomp/
* testsuite/libgomp.c-c++-common/reduction-17.c: New test.
gcc/c-family/c-omp.c
gcc/testsuite/c-c++-common/gomp/pr99928-10.c
gcc/testsuite/c-c++-common/gomp/pr99928-8.c
gcc/testsuite/c-c++-common/gomp/pr99928-9.c
libgomp/testsuite/libgomp.c-c++-common/reduction-17.c [new file with mode: 0644]