gcc/libgomp/testsuite/libgomp.c
Tom de Vries f87990a2a8 [openmp, simt] Disable SIMT for user-defined reduction
The test-case included in this patch contains this target region:
...
  for (int i0 = 0 ; i0 < N0 ; i0++ )
    counter_N0.i += 1;
...

When running with nvptx accelerator, the counter variable is expected to
be N0 after the region, but instead is N0 / 32.  The problem is that rather
than getting the result for all warp lanes, we get it for just one lane.

This is caused by the implementation of SIMT being incomplete.  It handles
regular reductions, but appearantly not user-defined reductions.

For now, handle this by disabling SIMT in this case, specifically by setting
sctx->max_vf to 1.

Tested libgomp on x86_64-linux with nvptx accelerator.

gcc/ChangeLog:

2021-05-03  Tom de Vries  <tdevries@suse.de>

	PR target/100321
	* omp-low.c (lower_rec_input_clauses): Disable SIMT for user-defined
	reduction.

libgomp/ChangeLog:

2021-05-03  Tom de Vries  <tdevries@suse.de>

	PR target/100321
	* testsuite/libgomp.c/target-44.c: New test.
2021-05-03 23:13:59 +02:00
..
appendix-a openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
examples-4 [hsa testsuite] Adjust libgomp tests that do not work on host fallback 2016-03-07 19:42:33 +01:00
affinity-1.c Update copyright years. 2021-01-04 10:26:59 +01:00
affinity-2.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
atomic-1.c
atomic-2.c
atomic-3.c
atomic-4.c
atomic-5.c
atomic-6.c
atomic-10.c
atomic-11.c
atomic-12.c
atomic-13.c
atomic-14.c
atomic-15.c
atomic-16.c
atomic-17.c
autopar-1.c
autopar-2.c
autopar-3.c
autopar-4.c
autopar-5.c
autopar-6.c
autopar-7.c
autopar-8.c
barrier-1.c
c.exp Introduce libgomp/testsuite/libgomp.c-c++-common 2017-09-14 21:15:40 +00:00
cancel-for-1.c
cancel-for-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
cancel-parallel-1.c
cancel-parallel-2.c
cancel-parallel-3.c
cancel-sections-1.c
collapse-1.c
collapse-2.c
collapse-3.c
copyin-1.c
copyin-2.c
copyin-3.c
critical-1.c
critical-2.c
debug-1.c
declare-variant-1.c lto: LTO cgraph support for late declare variant resolution [PR96680] 2020-10-28 10:29:09 +01:00
depend-1.c
depend-2.c
depend-3.c
depend-4.c
depend-5.c
depend-6.c
depend-7.c
depend-8.c
depend-9.c
depend-10.c
doacross-1.c omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
doacross-2.c omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
doacross-3.c omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
icv-1.c
icv-2.c
lib-1.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
lib-2.c openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
linear-1.c
lock-1.c
lock-2.c
lock-3.c
loop-1.c
loop-2.c
loop-3.c
loop-4.c
loop-5.c
loop-6.c
loop-7.c
loop-8.c
loop-9.c
loop-10.c
loop-11.c
loop-12.c
loop-16.c
loop-17.c openmp: Non-rectangular loop support for non-composite worksharing loops and distribute 2020-06-27 12:43:36 +02:00
loop-18.c openmp: Non-rectangular loop support for non-composite worksharing loops and distribute 2020-06-27 12:43:36 +02:00
loop-19.c openmp: Optimize triangular loop logical iterator to actual iterators computation using search for quadratic equation root(s) 2020-07-09 12:07:17 +02:00
loop-20.c openmp: Optimize triangular loop logical iterator to actual iterators computation using search for quadratic equation root(s) 2020-07-09 12:07:17 +02:00
loop-21.c openmp: Adjust outer bounds of non-rect loops 2020-07-14 10:31:59 +02:00
loop-22.c openmp: Add support for non-rectangular loops in taskloop construct 2020-08-13 09:06:05 +02:00
loop-23.c openmp: Add support for non-rectangular loops in taskloop construct 2020-08-13 09:06:05 +02:00
loop-24.c openmp: Add support for non-rectangular loops in taskloop construct 2020-08-13 09:06:05 +02:00
loop-25.c openmp: Add support for non-rect simd and improve collapsed simd support 2020-09-25 10:43:37 +02:00
nested-1.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
nested-2.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
nested-3.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
nestedfn-1.c
nestedfn-2.c
nestedfn-3.c
nestedfn-4.c
nestedfn-5.c
nestedfn-6.c
nqueens-1.c
omp_hello.c
omp_matvec.c
omp_orphan.c
omp_reduction.c
omp_workshare1.c
omp_workshare2.c
omp_workshare3.c
omp_workshare4.c
omp-loop01.c
omp-loop02.c
omp-loop03.c
omp-nested-1.c
omp-nested-2.c
omp-nested-3.c Fix GOMP/GOACC_parallel optimization in ipa-pta 2016-02-09 08:52:26 +00:00
omp-parallel-for.c
omp-parallel-if.c
omp-single-1.c
omp-single-2.c
omp-single-3.c
ordered-1.c
ordered-2.c
ordered-3.c
ordered-5.c
parallel-1.c
parloops-exit-first-loop-alt-2.c
parloops-exit-first-loop-alt-3.c
parloops-exit-first-loop-alt-4.c
parloops-exit-first-loop-alt-5.c
parloops-exit-first-loop-alt-6.c
parloops-exit-first-loop-alt-7.c
parloops-exit-first-loop-alt.c
pr24455-1.c
pr24455.c
pr26171.c
pr26943-1.c
pr26943-2.c
pr26943-3.c
pr26943-4.c
pr29947-1.c
pr29947-2.c
pr30494.c
pr32362-1.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
pr32362-2.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
pr32362-3.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
pr32468.c
pr33880.c
pr34513.c
pr35130.c
pr35196.c
pr35549.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
pr35625.c
pr36802-1.c
pr36802-2.c
pr36802-3.c
pr38650.c
pr39154.c
pr39591-1.c Fix failures on Solaris with -fno-common default 2019-11-21 16:14:21 +00:00
pr39591-2.c Fix failures on Solaris with -fno-common default 2019-11-21 16:14:21 +00:00
pr39591-3.c Fix failures on Solaris with -fno-common default 2019-11-21 16:14:21 +00:00
pr42029.c
pr42942.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
pr43893.c
pr46032-2.c Fix GOMP/GOACC_parallel optimization in ipa-pta 2016-02-09 08:52:26 +00:00
pr46032.c
pr46193.c
pr46886.c
pr48591.c Enable libgomp.c/pr48591.c on __float128 targets 2017-02-15 16:35:54 +00:00
pr49897-1.c
pr49897-2.c
pr49898-1.c
pr49898-2.c
pr52547.c
pr58392.c
pr58756.c
pr61200.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
pr64734.c
pr66133.c
pr66714.c
pr68960.c
pr69110.c
pr69805.c re PR driver/69805 (ICE in greater_than_spec_func, at gcc.c:9722) 2016-02-19 23:18:38 +01:00
pr70680-1.c re PR middle-end/70680 (OpenMP SIMD linear variable privatized too eagerly) 2016-04-20 03:42:24 +02:00
pr70680-2.c re PR middle-end/70680 (OpenMP SIMD linear variable privatized too eagerly) 2016-04-20 03:42:24 +02:00
pr79940.c re PR c/79940 (OpenMP pragma - internal compiler error with taskloop) 2017-03-08 18:21:06 +01:00
pr80394.c re PR libgomp/80394 (Empty OpenMP task is wrongly removed when optimizing) 2017-04-11 19:15:47 +02:00
pr80809-1.c re PR middle-end/80809 (Multi-free error for variable size array used within OpenMP task) 2017-05-22 20:54:05 +02:00
pr80809-2.c re PR middle-end/80809 (Multi-free error for variable size array used within OpenMP task) 2017-05-22 20:54:54 +02:00
pr80809-3.c re PR middle-end/80809 (Multi-free error for variable size array used within OpenMP task) 2017-05-22 20:54:54 +02:00
pr80853.c re PR middle-end/80853 (OpenMP ICE in build_outer_var_ref with array reduction) 2017-05-22 20:51:54 +02:00
pr81687-1.c re PR c/81687 (Compiler drops label in OpenMP region) 2017-08-10 02:33:20 +02:00
pr81687-2.c re PR c/81687 (Compiler drops label in OpenMP region) 2017-08-10 02:33:20 +02:00
pr81778.c [omp, simt] Handle alternative IV 2021-04-29 14:37:32 +02:00
pr86416-1.c libgomp/testsuite: Fix checks for dg-excess-errors 2021-04-21 20:07:19 +02:00
pr86416-2.c libgomp/testsuite: Fix checks for dg-excess-errors 2021-04-21 20:07:19 +02:00
pr86660.c re PR middle-end/86660 (libgomp.c++/for-15.C ICEs with nvptx offloading) 2018-07-26 18:12:02 +02:00
pr89002.c re PR middle-end/89002 (ICE in scan_omp_1_op, at omp-low.c:3166) 2019-01-28 23:34:32 +01:00
pr90779.c re PR middle-end/90779 (Fortran array initialization in offload regions) 2019-06-15 09:09:04 +02:00
pr90811.c re PR target/90811 ([nvptx] ptxas error on OpenMP offloaded code) 2019-06-11 18:40:10 +02:00
pr93566.c tree-nested: Fix handling of *reduction clauses with C array sections [PR93566] 2020-03-15 01:27:40 +01:00
pr95620.c x86-64: Define ASM_OUTPUT_ALIGNED_DECL_LOCAL 2020-07-18 08:51:54 -07:00
pr99555-1.c XFAIL OpenMP/nvptx execution-time hangs for simple nested OpenMP 'target'/'parallel'/'task' constructs [PR99555] 2021-04-15 11:13:27 +02:00
priority.c
private-1.c Fix failures on Solaris with -fno-common default 2019-11-21 16:14:21 +00:00
reduction-1.c
reduction-2.c
reduction-3.c
reduction-4.c
reduction-5.c
reduction-6.c
reduction-7.c
reduction-8.c
reduction-9.c
reduction-10.c
reduction-11.c
reduction-12.c
reduction-13.c
reduction-14.c
reduction-15.c
scan-1.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-2.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-3.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-4.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-5.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-6.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-7.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-8.c tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SCANTEMP_ clause. 2019-07-03 07:03:58 +02:00
scan-9.c omp-expand.c (expand_omp_for_static_nochunk): Don't emit GOMP_loop_start at the start of second worksharing loop in a scan. 2019-07-04 23:40:56 +02:00
scan-10.c omp-expand.c (expand_omp_for_static_nochunk): Don't emit GOMP_loop_start at the start of second worksharing loop in a scan. 2019-07-04 23:40:56 +02:00
scan-11.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-12.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-13.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-14.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-15.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-16.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-17.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-18.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-19.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-20.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
scan-21.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-28 12:13:21 +02:00
scan-22.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-28 12:13:21 +02:00
sections-1.c
sections-2.c
shared-1.c
shared-2.c
shared-3.c
simd-1.c
simd-2.c
simd-3.c
simd-4.c
simd-5.c
simd-6.c
simd-7.c
simd-8.c
simd-9.c
simd-10.c
simd-11.c
simd-12.c
simd-13.c
single-1.c
single-2.c
sort-1.c Update copyright years. 2021-01-04 10:26:59 +01:00
static-chunk-size-one.c
switch-conversion-2.c Fix switch conversion in offloading functions 2018-03-26 09:45:49 +00:00
switch-conversion.c Fix switch conversion in offloading functions 2018-03-26 09:45:49 +00:00
target-3.c
target-4.c
target-5.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
target-6.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
target-7.c
target-8.c
target-9.c
target-11.c
target-12.c
target-14.c
target-15.c
target-16.c
target-17.c
target-18.c tree-core.h (enum omp_clause_code): Adjust OMP_CLAUSE_USE_DEVICE_PTR OpenMP description. 2019-08-07 09:27:10 +02:00
target-19.c
target-20.c
target-21.c
target-22.c
target-23.c
target-24.c
target-25.c omp-low.c (lower_omp_target): Use GOMP_MAP_FIRSTPRIVATE_INT regardless whether there are depend clauses or not. 2016-04-12 09:05:29 +02:00
target-26.c
target-27.c
target-28.c
target-29.c
target-30.c
target-31.c libgomp: fix target-31.c testcase 2016-02-02 21:18:43 +03:00
target-32.c xfail and improve some failing libgomp tests [PR81690] 2020-10-28 10:30:41 +01:00
target-33.c openmp: ignore nowait if async execution is unsupported [PR93481] 2020-02-13 10:18:31 +01:00
target-34.c openmp: ignore nowait if async execution is unsupported [PR93481] 2020-02-13 10:18:31 +01:00
target-35.c
target-36.c omp-low: fix lastprivate/linear lowering for SIMT 2017-04-20 20:21:50 +03:00
target-37.c gimplify.c (omp_add_variable): Use GOVD_PRIVATE | GOVD_EXPLICIT for VLA helper variables on target data even if... 2019-08-08 08:39:02 +02:00
target-38.c openmp: Optimize DECL_IN_CONSTANT_POOL vars in target regions 2020-02-09 08:17:10 +01:00
target-39.c openmp: Implement discovery of implicit declare target to clauses 2020-05-12 09:17:09 +02:00
target-40.c openmp: Change omp_get_initial_device () to match OpenMP 5.1 requirements 2020-10-22 09:31:01 +02:00
target-41.c openmp: Add test for OMP_TARGET_OFFLOAD=mandatory for cases where it must not fail 2020-10-22 09:36:18 +02:00
target-42.c openmp: Implicitly discover declare target for variants of declare variant calls 2020-10-28 10:36:31 +01:00
target-43.c [omp, simt] Fix expand_GOMP_SIMT_* 2021-04-29 09:55:15 +02:00
target-44.c [openmp, simt] Disable SIMT for user-defined reduction 2021-05-03 23:13:59 +02:00
target-critical-1.c
target-link-1.c Fix OpenMP offload handling for target-link variables for nvptx (PR81689) 2020-03-24 15:13:56 +01:00
target-print-1.c Add tests for print from offload target. 2019-11-15 10:49:10 +00:00
target-teams-1.c
task-1.c Fix failures on Solaris with -fno-common default 2019-11-21 16:14:21 +00:00
task-2.c
task-3.c
task-4.c
task-5.c Fix failures on Solaris with -fno-common default 2019-11-21 16:14:21 +00:00
task-6.c openmp: Don't optimize shared to firstprivate on task with depend clause 2020-12-18 21:43:20 +01:00
task-reduction-1.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
task-reduction-3.c tree-nested.c (convert_nonlocal_omp_clauses, [...]): Handle OMP_CLAUSE_IN_REDUCTION... 2018-12-02 13:50:50 +01:00
teams-1.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
teams-2.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
teams-3.c openmp: Handle reduction clauses on host teams construct [PR96459] 2020-08-05 10:40:10 +02:00
thread-limit-1.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
thread-limit-2.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
thread-limit-3.c
thread-limit-4.c openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
thread-limit-5.c builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
udr-2.c
udr-3.c
uns-outer-4.c
usleep.h testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN 2020-11-18 14:11:27 +01:00
vla-1.c