[nvptx, PR83589] Workaround for branch-around-nothing JIT bug
authorTom de Vries <tom@codesourcery.com>
Wed, 24 Jan 2018 13:52:12 +0000 (13:52 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 24 Jan 2018 13:52:12 +0000 (13:52 +0000)
commit3dede32b88100a88ff442c6228dddc989a8f407b
treeeb27b1c0bbca40f1fd3c04b8cda1fff577c383d1
parentbe606483c9fc0c79ffb671238404203e01288b00
[nvptx, PR83589] Workaround for branch-around-nothing JIT bug

2018-01-24  Tom de Vries  <tom@codesourcery.com>

PR target/83589
* config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
(nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
Add strict parameter.
(prevent_branch_around_nothing): Insert dummy insn between branch to
label and label with no ptx insn inbetween.
* config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.

* testsuite/libgomp.oacc-c-c++-common/pr83589.c: New test.

From-SVN: r257016
gcc/ChangeLog
gcc/config/nvptx/nvptx.c
gcc/config/nvptx/nvptx.md
libgomp/ChangeLog
libgomp/testsuite/libgomp.oacc-c-c++-common/pr83589.c [new file with mode: 0644]