[llvm-branch-commits] [llvm] PowerPC: Add vec_malloc functions to AIX in RuntimeLibcalls (PR #167089)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 7 20:10:53 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/167089.diff


2 Files Affected:

- (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+4) 
- (added) llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll (+7) 


``````````diff
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index acc9a1bfc0f5b..0dd1460d15932 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -3158,6 +3158,10 @@ def PPCSystemLibrary
            has__stack_smash_handler,
            has___guard_local,
            AvailableIf<__ssp_canary_word, isAIX>,
+           AvailableIf<vec_calloc, isAIX>,
+           AvailableIf<vec_malloc, isAIX>,
+           AvailableIf<vec_realloc, isAIX>,
+           AvailableIf<vec_free, isAIX>,
            AvailableIf<__stack_chk_fail, isNotOSOpenBSD>,
            AvailableIf<__stack_chk_guard, isNotOSAIXAndNotOSOpenBSD>)>;
 
diff --git a/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll
new file mode 100644
index 0000000000000..97a3d487ad0ee
--- /dev/null
+++ b/llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll
@@ -0,0 +1,7 @@
+; REQUIRES: webassembly-registered-target
+; RUN: opt -S -passes=declare-runtime-libcalls -mtriple=powerpc64-ibm-aix < %s | FileCheck %s
+
+; CHECK: declare void @vec_calloc(...)
+; CHECK: declare void @vec_free(...)
+; CHECK: declare void @vec_malloc(...)
+; CHECK: declare void @vec_realloc(...)

``````````

</details>


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


More information about the llvm-branch-commits mailing list