From ea76847aab3757680adebf11c64ce75a8c726fe1 Mon Sep 17 00:00:00 2001 From: Matt Arsenault 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, + AvailableIf, + AvailableIf, + AvailableIf, 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(...)