[llvm] MSP430: Move __mspabi_mpyll calling conv config to tablegen (PR #153988)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 16 18:39:10 PDT 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153988
There are several libcall choices for MUL_I64 which depend on the
subtarget, but this is the base case. The manual custom ISelLowering
is still overriding the decision until we have a way to control
lowering choices, but we can still get the calling convention
set for now.
>From c16809eb7e5f82230bf5fceec3363805c85a5be8 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Sun, 17 Aug 2025 10:29:11 +0900
Subject: [PATCH] MSP430: Move __mspabi_mpyll calling conv config to tablegen
There are several libcall choices for MUL_I64 which depend on the
subtarget, but this is the base case. The manual custom ISelLowering
is still overriding the decision until we have a way to control
lowering choices, but we can still get the calling convention
set for now.
---
llvm/include/llvm/IR/RuntimeLibcalls.td | 3 +++
llvm/lib/IR/RuntimeLibcalls.cpp | 5 -----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 9072a0aa1531f..fd30debda4067 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -2053,6 +2053,9 @@ def MSP430SystemLibrary
__mspabi_remul,
LibcallsWithCC<(add __mspabi_remull), MSP430_BUILTIN>,
+ // May not be used depending on subtarget
+ LibcallsWithCC<(add __mspabi_mpyll), MSP430_BUILTIN>,
+
// Bitwise Operations - EABI Table 10
// TODO: __mspabi_[srli/srai/slli] ARE implemented in libgcc
__mspabi_srll,
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 88cb192c08781..09fb78e7a2ac8 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -54,11 +54,6 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
return;
}
-
- if (TT.getArch() == Triple::ArchType::msp430) {
- setLibcallImplCallingConv(RTLIB::__mspabi_mpyll,
- CallingConv::MSP430_BUILTIN);
- }
}
LLVM_ATTRIBUTE_ALWAYS_INLINE
More information about the llvm-commits
mailing list