From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B6D31386EC59; Tue, 22 Sep 2020 07:18:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6D31386EC59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600759093; bh=6tFcICD6Czu32kjJJWKnMsidAKu09HE8Q18SNv3eVXc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vQRxKT5TCSO+doZFcuFu/KvC0xNe5sFWETCYC3CFV6C9hYJFv65IYD5M3oO09NWYY dU2cg4Jq0OWpU4KX4r4Tw83eU7Hr28/4D4HzQ2avMzYwVplNX7ofncikLK4yzRooWK zApgS8HCFYNFZ5/IU7aYt1Or01TUWFyy1KjUA5fo= From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97102] [nvptx] PTX JIT compilation failed when using aliases Date: Tue, 22 Sep 2020 07:18:13 +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: 11.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: vries 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: attachments.created 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: Tue, 22 Sep 2020 07:18:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97102 --- Comment #5 from Tom de Vries --- Created attachment 49252 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49252&action=3Dedit Other draft patch I started out independently, and converged to roughly the same code. One thing I came across during standalone testing is that the alias support= in gcc is for symbols, and as such supports functions and variables, but the p= tx support is only there for functions. I handle this in the patch with an er= ror, but it causes quite a few failures: ... src/gcc/testsuite/gcc.c-torture/execute/alias-2.c:3:12: error: non-function alias definitions not supported in this configuration^M compiler exited with status 1 FAIL: gcc.c-torture/execute/alias-2.c -O0 (test for excess errors) ... So, that would probably need to be handled by separate effective targets alias_var/alias_fn. With standalone testing we also run into various problems related to bumping the ISA, see also PR96005. As for libgomp testing, I've tried the test reported in this PR, and got th= is ptx link error (silent with trunk, needed to add some printing in plugin): ... Internal error: reference to deleted section ... By dumping the ptx code using GOMP_NVPTX_PTXRW and compiling it using ptxas= , it becomes clear that the most complained about problem is deprecated shfl: ... ptxas gomp-nvptx.11.ptx, line 117; warning : Instruction 'shfl' without '.s= ync' is deprecated since PTX ISA version 6.0 and will be discontinued in a future PTX ISA version ... The internal error is a driver problem, but it's possible that we push the driver into a corner by using deprecated insns alongside with modern constr= ucts like .alias. So, it seems sensible to do the porting to newer ISA (PR96005) first, before trying to enable .alias.=