From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DEA28385842E; Tue, 8 Feb 2022 08:07:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEA28385842E 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: Tue, 08 Feb 2022 08:07:54 +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: 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: cf_gcctarget keywords 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, 08 Feb 2022 08:07:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104440 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |nvptx Keywords| |testsuite-fail --- Comment #1 from Tom de Vries --- 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, true)= ); 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 (); + } } } ...=