[clang] [llvm] [SPIR-V] Add clang builtin for group-wide barrier (PR #175064)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 12:39:43 PST 2026


================
@@ -133,8 +133,8 @@ def int_spv_rsqrt : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty]
       : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrConvergent]>;
   def int_spv_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>;
   def int_spv_radians : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>;
-  def int_spv_group_memory_barrier_with_group_sync
-      : DefaultAttrsIntrinsic<[], [], [IntrConvergent]>;
+  def int_spv_group_memory_barrier_with_group_sync : ClangBuiltin<"__builtin_spirv_group_barrier">,
----------------
jhuber6 wrote:

https://github.com/llvm/llvm-project/blob/21a1e6e6a70d70635c68b9aaa54f816ae36a6416/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/group_memory_barrier_with_group_sync.ll

https://github.com/llvm/llvm-project/pull/175064


More information about the llvm-commits mailing list