[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 11:25:55 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff fabe7e39df624c09d399f5f61d5450c2021c2357 628e7d8991f3e8114bb1afbb28bf3eebba622be8 --extensions h,cpp -- clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGHLSLRuntime.h clang/lib/Headers/hlsl/hlsl_intrinsics.h clang/lib/Sema/SemaHLSL.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 45890019ee..09f662db04 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -18902,7 +18902,8 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
         nullptr, "hlsl.radians");
   }
   case Builtin::BI__builtin_group_memory_barrier_with_group_sync: {
-    Intrinsic::ID ID = CGM.getHLSLRuntime().getGroupMemoryBarrierWithGroupSyncIntrinsic();
+    Intrinsic::ID ID =
+        CGM.getHLSLRuntime().getGroupMemoryBarrierWithGroupSyncIntrinsic();
     return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID));
   }
   }
diff --git a/clang/lib/CodeGen/CGHLSLRuntime.h b/clang/lib/CodeGen/CGHLSLRuntime.h
index 1e095cedf5..28a81ddaf3 100644
--- a/clang/lib/CodeGen/CGHLSLRuntime.h
+++ b/clang/lib/CodeGen/CGHLSLRuntime.h
@@ -89,7 +89,8 @@ public:
   GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot)
   GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot)
   GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane)
-  GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync, groupMemoryBarrierWithGroupSync)
+  GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync,
+                                   groupMemoryBarrierWithGroupSync)
 
   //===----------------------------------------------------------------------===//
   // End of reserved area for HLSL intrinsic getters.

``````````

</details>


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


More information about the cfe-commits mailing list