aboutsummaryrefslogtreecommitdiff
path: root/libcpp/macro.cc
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-01-28 10:28:59 +0100
committerTom de Vries <tdevries@suse.de>2022-02-01 19:29:01 +0100
commitf32f74c2e8cef5fe37af6d4e8d7e8f6b4c8ae9a8 (patch)
tree5e9e1113f617f48d97af733a2e977f407e2f8481 /libcpp/macro.cc
parentbba61d403d05202deb698b352a4faef3feb1f04d (diff)
downloadgcc-f32f74c2e8cef5fe37af6d4e8d7e8f6b4c8ae9a8.zip
gcc-f32f74c2e8cef5fe37af6d4e8d7e8f6b4c8ae9a8.tar.gz
gcc-f32f74c2e8cef5fe37af6d4e8d7e8f6b4c8ae9a8.tar.bz2
[nvptx] Add uniform_warp_check insn
On a GT 1030, with driver version 470.94 and -mptx=3.1 I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \ -O2 execution test ... which minimizes to the same test-case as listed in commit "[nvptx] Update default ptx isa to 6.3". The problem is again that the first diverging branch is not handled as such in SASS, which causes problems with a subsequent shfl insn, but given that we have -mptx=3.1 we can't use the bar.warp.sync insn. Given that the default is now -mptx=6.3, and consequently -mptx=3.1 is of a lesser importance, implement the next best thing: abort when detecting non-convergence using this insn: ... { .reg.b32 act; vote.ballot.b32 act,1; .reg.pred uni; setp.eq.b32 uni,act,0xffffffff; @ !uni trap; @ !uni exit; } ... Interestingly, the effect of this is that rather than aborting, the test-case now passes. Tested on x86_64 with nvptx accelerator. gcc/ChangeLog: 2022-01-31 Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx.cc (nvptx_single): Use nvptx_uniform_warp_check. * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_UNIFORM_WARP_CHECK. (define_insn "nvptx_uniform_warp_check"): New define_insn.
Diffstat (limited to 'libcpp/macro.cc')
0 files changed, 0 insertions, 0 deletions