https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86757

            Bug ID: 86757
           Summary: [og8,nvptx] gangprivate related regressions
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cesar at gcc dot gnu.org
  Target Milestone: ---

The goacc_parlevel patches have been backported to openacc-gcc-8-branch in git
revision 6781e2dd99. For the most part, the patches applied cleanly, however, I
had to xfail the following tests in libgomp.oacc-c-c++-common because they fail
with -O0:

   loop-gwv-1.c
   loop-red-gwv-1.c
   loop-red-w-2.c

These tests work on trunk at -O0. I believe the problem was introduced with the
gangprivate patch. When I deactivated the gangprivate patch by modifying
nvptx.c:nvptx_goacc_expand_accel_var to always return NULL_RTX, those test
cases started passing.

I suspect this bug crept into og8 because those aforementioned tests were
originally skipped altogether at -O0 because they contained inline PTX assembly
code, which wasn't optimized away by the host compiler unless the program is
built with -O1 or greater. The goacc_parlevel changes replace the inline PTX
code with builtin functions that get expanded by the backend, which enables
those tests to run at -O0.

Reply via email to