[llvm] [ARM] Remove an unnecessary cast (NFC) (PR #148869)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 08:36:58 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/148869
TII is already of const ARMBaseInstrInfo *. This patch removes AII in
favor of TII.
>From 32316a1f360aea38b6494977952df634473bd993 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 15 Jul 2025 08:07:34 -0700
Subject: [PATCH] [ARM] Remove an unnecessary cast (NFC)
TII is already of const ARMBaseInstrInfo *. This patch removes AII in
favor of TII.
---
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
index 52302241fe365..57141ab69223f 100644
--- a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
@@ -2542,9 +2542,7 @@ bool ARMExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
}
case ARM::Int_eh_sjlj_dispatchsetup: {
MachineFunction &MF = *MI.getParent()->getParent();
- const ARMBaseInstrInfo *AII =
- static_cast<const ARMBaseInstrInfo*>(TII);
- const ARMBaseRegisterInfo &RI = AII->getRegisterInfo();
+ const ARMBaseRegisterInfo &RI = TII->getRegisterInfo();
// For functions using a base pointer, we rematerialize it (via the frame
// pointer) here since eh.sjlj.setjmp and eh.sjlj.longjmp don't do it
// for us. Otherwise, expand to nothing.
More information about the llvm-commits
mailing list