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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vr...@gcc.gnu.org>:

https://gcc.gnu.org/g:456de10c549379b74d4858f00d4b8817035a73fc

commit r12-6967-g456de10c549379b74d4858f00d4b8817035a73fc
Author: Tom de Vries <tdevr...@suse.de>
Date:   Sun Jan 23 06:42:24 2022 +0100

    [nvptx] Handle nop in prevent_branch_around_nothing

    When running libgomp test-case reduction-7.c on an nvptx accelerator
    (T400, driver version 470.86) and GOMP_NVPTX_JIT=-O0, I run into:
    ...
    reduction-7.exe:reduction-7.c:312: v_p_2: \
      Assertion `out[j * 32 + i] == (i + j) * 2' failed.
    FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-7.c \
      -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \
      -O0  execution test
    ...

    During investigation I found ptx code like this:
    ...
    @ %r163 bra $L262;
    $L262:
    ...

    There's a known problem with executing this type of code, and a workaround
is
    in place to address this: prevent_branch_around_nothing.  The workaround
does
    not trigger though because it doesn't handle the nop insn.

    Fix this by handling the nop insn in prevent_branch_around_nothing.

    Tested libgomp on x86_64 with nvptx accelerator.

    gcc/ChangeLog:

    2022-01-27  Tom de Vries  <tdevr...@suse.de>

            PR target/100428
            * config/nvptx/nvptx.cc (prevent_branch_around_nothing): Handle nop
            insn.
  • [Bug target/100428] [nvptx, GOM... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to