]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
OpenAcc: Correction of reduction enhancement
authorMarcel Vollweiler <marcel@codesourcery.com>
Tue, 25 Oct 2022 15:12:42 +0000 (08:12 -0700)
committerMarcel Vollweiler <marcel@codesourcery.com>
Tue, 25 Oct 2022 15:12:42 +0000 (08:12 -0700)
Commit bce2c92cfec2ae1eb9d79e36dff5a220b688bfa1 "Various OpenACC reduction
enhancements - ME and nvptx changes" introduced several regressions:

        gcc/testsuite/c-c++-common/goacc/nested-reductions-1-routine.c
        gcc/testsuite/c-c++-common/goacc/nested-reductions-2-routine.c
        gcc/testsuite/c-c++-common/goacc/orphan-reductions-2.c
        gcc/testsuite/gfortran.dg/goacc/nested-reductions-1-routine.f90
        gcc/testsuite/gfortran.dg/goacc/nested-reductions-2-routine.f90
        gcc/testsuite/gfortran.dg/goacc/orphan-reductions-2.f90

This fixes above regressions.

gcc/ChangeLog:

        * omp-offload.cc (oacc_loop_auto_partitions): Removed OLF reduction
        handling.

gcc/ChangeLog.omp
gcc/omp-offload.cc

index 68d5eea01a794c90cf063d8a8617102259ba4965..9b2a2007ac12cf349a15f9aed1dcaa201277d6e1 100644 (file)
@@ -1,3 +1,8 @@
+2022-10-25  Marcel Vollweiler  <marcel@codesourcery.com>
+
+       * omp-offload.cc (oacc_loop_auto_partitions): Removed OLF reduction
+       handling.
+
 2022-10-24  Andrew Stubbs  <ams@codesourcery.com>
 
        * tree-vect-data-refs.cc (vect_analyze_data_refs): Workaround an
index 979bc0badb2bc56bae11006d6e93cfc53b494272..b18f28f86b9b36edcde0aa5ae3ecd53ff2fcc7f8 100644 (file)
@@ -2265,13 +2265,6 @@ oacc_loop_auto_partitions (oacc_loop *loop, unsigned outer_mask,
         non-innermost available level.  */
       unsigned this_mask = GOMP_DIM_MASK (GOMP_DIM_GANG);
 
-      /* Orphan reductions cannot have gang partitioning.  */
-      if ((loop->flags & OLF_REDUCTION)
-         && oacc_get_fn_attrib (current_function_decl)
-         && !lookup_attribute ("omp target entrypoint",
-                               DECL_ATTRIBUTES (current_function_decl)))
-       this_mask = GOMP_DIM_MASK (GOMP_DIM_WORKER);
-
       /* Find the first outermost available partition. */
       while (this_mask <= outer_mask)
        this_mask <<= 1;