[clang] [PowerPC] Add missing vec_msum and vec_vmsumudm builtins for POWER9 (PR #221199)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 00:57:28 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/SemaCXX/altivec-vec-msum-p9.cpp clang/lib/Headers/altivec.h clang/test/CodeGen/PowerPC/builtins-ppc-p9vector.c --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/Headers/altivec.h b/clang/lib/Headers/altivec.h
index 929189be0..44725538d 100644
--- a/clang/lib/Headers/altivec.h
+++ b/clang/lib/Headers/altivec.h
@@ -6081,9 +6081,10 @@ vec_msum(vector unsigned short __a, vector unsigned short __b,
 }
 
 #if defined(__POWER9_VECTOR__) && defined(__SIZEOF_INT128__)
-static __inline__ vector unsigned __int128 __ATTRS_o_ai
-vec_msum(vector unsigned long long __a, vector unsigned long long __b,
-         vector unsigned __int128 __c) {
+static __inline__ vector unsigned __int128
+    __ATTRS_o_ai vec_msum(vector unsigned long long __a,
+                          vector unsigned long long __b,
+                          vector unsigned __int128 __c) {
   return __builtin_altivec_vmsumudm(__a, __b, __c);
 }
 #endif

``````````

</details>


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


More information about the cfe-commits mailing list