From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4CAA03858C2C; Fri, 11 Feb 2022 07:46:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CAA03858C2C From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104456] nvptx: prevent_branch_around_nothing doesn't handle asm ("") Date: Fri, 11 Feb 2022 07:46:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2022 07:46:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104456 --- Comment #1 from CVS Commits --- The master branch has been updated by Tom de Vries : https://gcc.gnu.org/g:fd64b09217fbe8fa33b559e61564071e8aca71e5 commit r12-7190-gfd64b09217fbe8fa33b559e61564071e8aca71e5 Author: Tom de Vries Date: Thu Feb 10 11:26:16 2022 +0100 [nvptx] Handle asm insn in prevent_branch_around_nothing With GOMP_NVPTX_JIT=3D-00 and -mptx=3D3.1, I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-version-1.c \ -DACC_DEVICE_TYPE_nvidia=3D1 -DACC_MEM_SHARED=3D0 -foffload=3Dnvptx-n= one -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 i= nto the nvptx_uniform_warp_check. Fix this by handling asm ("") and alike in prevent_branch_around_nothin= g. Tested on x86_64 with nvptx accelerator. gcc/ChangeLog: 2022-02-10 Tom de Vries PR target/104456 * config/nvptx/nvptx.cc (prevent_branch_around_nothing): Handle= asm insn.=