[llvm] ARM: Remove check for isAAPCS_ABI when enabling various aeabi calls (PR #152108)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 02:40:26 PDT 2025


https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/152108

Based on computeDefaultTargetABI, this appears to be redundant.

The only test using the explicit -target-abi flag with a value different
than one implied by the triple (i.e. assert(TM.isAAPCS_ABI()) under
the condition) is arm-abi-attr.ll and it doesn't stress the libcalls
used.

>From 0cddf803a3250f8b1589fb73bfcee65e9b8d6559 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Tue, 5 Aug 2025 18:23:36 +0900
Subject: [PATCH] ARM: Remove check for isAAPCS_ABI when enabling various aeabi
 calls

Based on computeDefaultTargetABI, this appears to be redundant.

The only test using the explicit -target-abi flag with a value different
than one implied by the triple (i.e. assert(TM.isAAPCS_ABI()) under
the condition) is arm-abi-attr.ll and it doesn't stress the libcalls
used.
---
 llvm/lib/Target/ARM/ARMISelLowering.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 7f8b4460bb814..a621e5c63eb07 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -588,8 +588,8 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM_,
   }
 
   // RTLIB
-  if (TM.isAAPCS_ABI() && (TT.isTargetAEABI() || TT.isTargetGNUAEABI() ||
-                           TT.isTargetMuslAEABI() || TT.isAndroid())) {
+  if (TT.isTargetAEABI() || TT.isTargetGNUAEABI() || TT.isTargetMuslAEABI() ||
+      TT.isAndroid()) {
     // FIXME: This does not depend on the subtarget and should go directly into
     // RuntimeLibcalls. This is only here because of missing support for setting
     // the calling convention of an implementation.



More information about the llvm-commits mailing list