[llvm-branch-commits] [llvm] PowerPC: Add vec_malloc functions to AIX in RuntimeLibcalls (PR #167089)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 26 07:44:00 PST 2025
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/167089
>From 3d16bc84a5ae3c98b46d85e413801ff2288f0fae Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Fri, 7 Nov 2025 20:01:39 -0800
Subject: [PATCH] PowerPC: Add vec_malloc functions to AIX in RuntimeLibcalls
---
llvm/include/llvm/IR/RuntimeLibcalls.td | 4 ++++
llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll | 7 +++++++
2 files changed, 11 insertions(+)
create mode 100644 llvm/test/Transforms/Util/DeclareRuntimeLibcalls/aix.ll
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-branch-commits
mailing list