@@ -32,6 +32,7 @@ enum ptx_isa
enum ptx_version
{
PTX_VERSION_3_1,
+ PTX_VERSION_6_0,
PTX_VERSION_6_3,
PTX_VERSION_7_0
};
@@ -91,6 +91,7 @@
#define TARGET_SM75 (ptx_isa_option >= PTX_ISA_SM75)
#define TARGET_SM80 (ptx_isa_option >= PTX_ISA_SM80)
+#define TARGET_PTX_6_0 (ptx_version_option >= PTX_VERSION_6_0)
#define TARGET_PTX_6_3 (ptx_version_option >= PTX_VERSION_6_3)
#define TARGET_PTX_7_0 (ptx_version_option >= PTX_VERSION_7_0)
@@ -1968,9 +1968,13 @@ (define_insn "nvptx_barsync"
""
{
if (INTVAL (operands[1]) == 0)
- return "\\tbar.sync\\t%0;";
+ return (TARGET_PTX_6_0
+ ? "\\tbarrier.sync.aligned\\t%0;"
+ : "\\tbar.sync\\t%0;");
else
- return "\\tbar.sync\\t%0, %1;";
+ return (TARGET_PTX_6_0
+ ? "\\tbarrier.sync\\t%0, %1;"
+ : "\\tbar.sync\\t%0, %1;");
}
[(set_attr "predicable" "false")])