https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104440
Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |nvptx Keywords| |testsuite-fail --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- 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 (); + } } } ...