[llvm] 716fffe - PowerPC: Add vec_malloc functions to AIX in RuntimeLibcalls (#167089)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 07:54:43 PST 2025


Author: Matt Arsenault
Date: 2025-12-05T16:54:39+01:00
New Revision: 716fffe53059456011619549b1330490ec3cf7f8

URL: https://github.com/llvm/llvm-project/commit/716fffe53059456011619549b1330490ec3cf7f8
DIFF: https://github.com/llvm/llvm-project/commit/716fffe53059456011619549b1330490ec3cf7f8.diff

LOG: PowerPC: Add vec_malloc functions to AIX in RuntimeLibcalls (#167089)

Added: 
    llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll

Modified: 
    llvm/include/llvm/IR/RuntimeLibcalls.td

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 09e33d7f89e8a..2d7ebc30e6097 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(...)


        


More information about the llvm-commits mailing list