[PATCH] D16941: [NVPTX] Mark nvvm synchronizing intrinsics as convergent.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 6 11:36:57 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL260005: [NVPTX] Mark nvvm synchronizing intrinsics as convergent. (authored by jlebar).

Changed prior to commit:
  http://reviews.llvm.org/D16941?vs=47069&id=47088#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16941

Files:
  llvm/trunk/include/llvm/IR/IntrinsicsNVVM.td
  llvm/trunk/test/Feature/intrinsic-noduplicate.ll

Index: llvm/trunk/test/Feature/intrinsic-noduplicate.ll
===================================================================
--- llvm/trunk/test/Feature/intrinsic-noduplicate.ll
+++ llvm/trunk/test/Feature/intrinsic-noduplicate.ll
@@ -1,9 +1,9 @@
 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
 
-; Make sure LLVM knows about the noduplicate attribute on the
+; Make sure LLVM knows about the convergent and noduplicate attributes on the
 ; llvm.cuda.syncthreads intrinsic.
 
 declare void @llvm.cuda.syncthreads()
 
 ; CHECK: declare void @llvm.cuda.syncthreads() #[[ATTRNUM:[0-9]+]]
-; CHECK: attributes #[[ATTRNUM]] = { noduplicate nounwind }
+; CHECK: attributes #[[ATTRNUM]] = { convergent noduplicate nounwind }
Index: llvm/trunk/include/llvm/IR/IntrinsicsNVVM.td
===================================================================
--- llvm/trunk/include/llvm/IR/IntrinsicsNVVM.td
+++ llvm/trunk/include/llvm/IR/IntrinsicsNVVM.td
@@ -729,16 +729,20 @@
                                       [IntrReadWriteArgMem, NoCapture<0>]>;
 
 // Bar.Sync
+//
+// TODO: Remove NoDuplicate here after fixing up LLVM to handle convergent
+// properly.  See discussion in http://reviews.llvm.org/D16941 and
+// http://reviews.llvm.org/D12246.
   def int_cuda_syncthreads : GCCBuiltin<"__syncthreads">,
-      Intrinsic<[], [], [IntrNoDuplicate]>;
+      Intrinsic<[], [], [IntrNoDuplicate, IntrConvergent]>;
   def int_nvvm_barrier0 : GCCBuiltin<"__nvvm_bar0">,
-      Intrinsic<[], [], [IntrNoDuplicate]>;
+      Intrinsic<[], [], [IntrNoDuplicate, IntrConvergent]>;
   def int_nvvm_barrier0_popc : GCCBuiltin<"__nvvm_bar0_popc">,
-      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate]>;
+      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>;
   def int_nvvm_barrier0_and : GCCBuiltin<"__nvvm_bar0_and">,
-      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate]>;
+      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>;
   def int_nvvm_barrier0_or : GCCBuiltin<"__nvvm_bar0_or">,
-      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate]>;
+      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>;
 
   // Membar
   def int_nvvm_membar_cta : GCCBuiltin<"__nvvm_membar_cta">,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16941.47088.patch
Type: text/x-patch
Size: 2271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160206/7892bec0/attachment.bin>


More information about the llvm-commits mailing list