https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96005
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- On my usual machine, using system cuda I don't get beyond 6.1: ... diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 7a7a9130e84..ecf3803df3c 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -5309,7 +5309,9 @@ static void nvptx_file_start (void) { fputs ("// BEGIN PREAMBLE\n", asm_out_file); - fputs ("\t.version\t3.1\n", asm_out_file); + /* PTX ISA version 6.1 is the current version for ptxas from cuda 9.1, + which is the current system release on ubuntu 18.04.5. */ + fputs ("\t.version\t6.1\n", asm_out_file); if (TARGET_SM35) fputs ("\t.target\tsm_35\n", asm_out_file); else diff --git a/gcc/config/nvptx/nvptx.md b/gcc/config/nvptx/nvptx.md index 0f15609ee4b..39a695d275c 100644 --- a/gcc/config/nvptx/nvptx.md +++ b/gcc/config/nvptx/nvptx.md @@ -1452,7 +1452,7 @@ (match_operand:SI 3 "const_int_operand" "n")] UNSPEC_SHUFFLE))] "" - "%.\\tshfl%S3.b32\\t%0, %1, %2, 31;") + "%.\\tshfl.sync%S3.b32\\t%0, %1, %2, 31, 0xffffffff;") (define_insn "nvptx_vote_ballot" [(set (match_operand:SI 0 "nvptx_register_operand" "=R") ...