[clang] [z/OS][Clang] Add compare and swap builtin functions (PR #202362)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 09:22:09 PDT 2026


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 origin/main HEAD --extensions h,cpp,c -- clang/test/CodeGen/SystemZ/builtins-zos-cds1.c clang/test/CodeGen/SystemZ/builtins-zos-cdsg.c clang/test/CodeGen/SystemZ/builtins-zos-cs.c clang/test/CodeGen/SystemZ/builtins-zos-cs1.c clang/test/CodeGen/SystemZ/builtins-zos-csg.c clang/include/clang/Basic/TargetBuiltins.h clang/lib/Basic/Targets/SystemZ.cpp clang/lib/CodeGen/TargetBuiltins/SystemZ.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/TargetBuiltins/SystemZ.cpp b/clang/lib/CodeGen/TargetBuiltins/SystemZ.cpp
index cfb75e1e0..1c115baf5 100644
--- a/clang/lib/CodeGen/TargetBuiltins/SystemZ.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/SystemZ.cpp
@@ -132,10 +132,10 @@ Value *CodeGenFunction::EmitSystemZBuiltinExpr(unsigned BuiltinID,
     return EmitAtomicCmpXchgForZOSIntrin(*this, E, Int128Ty, true);
   }
 
-  // Vector builtins.  Note that most vector builtins are mapped automatically
-  // to target-specific LLVM intrinsics.  The ones handled specially here can
-  // be represented via standard LLVM IR, which is preferable to enable common
-  // LLVM optimizations.
+    // Vector builtins.  Note that most vector builtins are mapped automatically
+    // to target-specific LLVM intrinsics.  The ones handled specially here can
+    // be represented via standard LLVM IR, which is preferable to enable common
+    // LLVM optimizations.
 
   case SystemZ::BI__builtin_s390_vclzb:
   case SystemZ::BI__builtin_s390_vclzh:

``````````

</details>


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


More information about the cfe-commits mailing list