From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1980C3857818; Thu, 17 Feb 2022 07:37:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1980C3857818 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104440] nvptx: FAIL: gcc.c-torture/execute/pr53465.c execution test Date: Thu, 17 Feb 2022 07:37: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: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Thu, 17 Feb 2022 07:37:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104440 --- Comment #9 from Tom de Vries --- (In reply to Tom de Vries from comment #1) > Tentative patch that fixes example: > ... > diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc > index 5b26c0f4c7dd..4dc154434853 100644 > --- a/gcc/config/nvptx/nvptx.cc > +++ b/gcc/config/nvptx/nvptx.cc > @@ -1565,6 +1565,23 @@ nvptx_declare_function_name (FILE *file, const char > *name, cons > t_tree decl) > fprintf (file, "\t.reg%s ", nvptx_ptx_type_from_mode (mode, tru= e)); > output_reg (file, i, split, -2); > fprintf (file, ";\n"); > + switch (mode) > + { > + case HImode: > + fprintf (file, "\tmov.u16 %%r%d, 0;\n", i); > + break; > + case SImode: > + fprintf (file, "\tmov.u32 %%r%d, 0;\n", i); > + break; > + case DImode: > + fprintf (file, "\tmov.u64 %%r%d, 0;\n", i); > + break; > + case BImode: > + fprintf (file, "\tsetp.ne.u32 %%r%d,0,0;\n", i); > + break; > + default: > + gcc_unreachable (); > + } > } > } >=20=20 > ... FWIW, I've tested this patch (extended a bit to handle all cases) but ran i= nto trouble in the libgomp testsuite, with running out of resources. So this approach is too resource-hungry.=