[llvm-branch-commits] [llvm] ARM: Move sjlj libcall configuration to RuntimeLibcalls (PR #147227)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Jul 6 18:27:57 PDT 2025


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

None

>From 1ea9863111f0335dbf31d0bdc862f857eddfe18b Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 2 Jul 2025 17:29:40 +0900
Subject: [PATCH] ARM: Move sjlj libcall configuration to RuntimeLibcalls

---
 llvm/lib/IR/RuntimeLibcalls.cpp         | 2 +-
 llvm/lib/Target/ARM/ARMISelLowering.cpp | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 712f1a48d0b7b..070131aead46b 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -362,7 +362,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT,
   if (TT.isX86() && TT.isGNUEnvironment())
     setLongDoubleIsF128Libm(*this, /*FiniteOnlyFuncs=*/true);
 
-  if (TT.isX86() || TT.isVE()) {
+  if (TT.isX86() || TT.isVE() || TT.isARM() || TT.isThumb()) {
     if (ExceptionModel == ExceptionHandling::SjLj)
       setLibcallImpl(RTLIB::UNWIND_RESUME, RTLIB::_Unwind_SjLj_Resume);
   }
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 6be41a01e0696..a487654d7cad8 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -1400,8 +1400,6 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM_,
   setOperationAction(ISD::EH_SJLJ_SETJMP, MVT::i32, Custom);
   setOperationAction(ISD::EH_SJLJ_LONGJMP, MVT::Other, Custom);
   setOperationAction(ISD::EH_SJLJ_SETUP_DISPATCH, MVT::Other, Custom);
-  if (Subtarget->useSjLjEH())
-    setLibcallImpl(RTLIB::UNWIND_RESUME, RTLIB::_Unwind_SjLj_Resume);
 
   setOperationAction(ISD::SETCC,     MVT::i32, Expand);
   setOperationAction(ISD::SETCC,     MVT::f32, Expand);



More information about the llvm-branch-commits mailing list