public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104456] New: nvptx: prevent_branch_around_nothing doesn't handle asm ("")
@ 2022-02-09 6:23 vries at gcc dot gnu.org
2022-02-11 7:46 ` [Bug target/104456] " cvs-commit at gcc dot gnu.org
2022-02-11 7:48 ` vries at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2022-02-09 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104456
Bug ID: 104456
Summary: nvptx: prevent_branch_around_nothing doesn't handle
asm ("")
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
Testing on a GT 1030, with driver 510.x, GOMP_NVPTX_JIT=-00 and -mptx=3.1, I
run into:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-version-1.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2
execution test
...
The test-case runs into the warp divergence check, because we have:
...
@ %r23 bra $L2;
$L2:
...
The prevent_branch_around_nothing is supposed to handle this, but it doesn't
trigger for 'asm ("")'.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/104456] nvptx: prevent_branch_around_nothing doesn't handle asm ("")
2022-02-09 6:23 [Bug target/104456] New: nvptx: prevent_branch_around_nothing doesn't handle asm ("") vries at gcc dot gnu.org
@ 2022-02-11 7:46 ` cvs-commit at gcc dot gnu.org
2022-02-11 7:48 ` vries at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-11 7:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104456
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@gcc.gnu.org>:
https://gcc.gnu.org/g:fd64b09217fbe8fa33b559e61564071e8aca71e5
commit r12-7190-gfd64b09217fbe8fa33b559e61564071e8aca71e5
Author: Tom de Vries <tdevries@suse.de>
Date: Thu Feb 10 11:26:16 2022 +0100
[nvptx] Handle asm insn in prevent_branch_around_nothing
With GOMP_NVPTX_JIT=-00 and -mptx=3.1, I run into:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-version-1.c \
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2 \
execution test
...
The problem is that we're generating a diverging branch around nothing:
...
{
.reg.u32 %x;
mov.u32 %x, %tid.x;
setp.ne.u32 %r23, %x, 0;
}
@%r23 bra $L2;
$L2:
...
which the driver JIT has problems with at -O0, so consequently we run into
the
nvptx_uniform_warp_check.
Fix this by handling asm ("") and alike in prevent_branch_around_nothing.
Tested on x86_64 with nvptx accelerator.
gcc/ChangeLog:
2022-02-10 Tom de Vries <tdevries@suse.de>
PR target/104456
* config/nvptx/nvptx.cc (prevent_branch_around_nothing): Handle asm
insn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/104456] nvptx: prevent_branch_around_nothing doesn't handle asm ("")
2022-02-09 6:23 [Bug target/104456] New: nvptx: prevent_branch_around_nothing doesn't handle asm ("") vries at gcc dot gnu.org
2022-02-11 7:46 ` [Bug target/104456] " cvs-commit at gcc dot gnu.org
@ 2022-02-11 7:48 ` vries at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: vries at gcc dot gnu.org @ 2022-02-11 7:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104456
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by "[nvptx] Handle asm insn in prevent_branch_around_nothing".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-11 7:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 6:23 [Bug target/104456] New: nvptx: prevent_branch_around_nothing doesn't handle asm ("") vries at gcc dot gnu.org
2022-02-11 7:46 ` [Bug target/104456] " cvs-commit at gcc dot gnu.org
2022-02-11 7:48 ` vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).