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

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 8 12:38:20 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">,
----------------
sarnex wrote:

Does the backend automagically know how to emit this as a a SPIR-V instruction?

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


More information about the cfe-commits mailing list