From d4c2887118069b34c07a19752ea43e9acfa83dd4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 11 Jul 2025 11:31:49 -0700 Subject: [PATCH] [AArch64] Remove unnecessary casts (NFC) getInstrInfo() already returns const AArch64InstrInfo *. --- llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp | 2 +- llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp | 2 +- llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp b/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp index 83804b4b09bc4..21756177fc74a 100644 --- a/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp +++ b/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp @@ -812,7 +812,7 @@ bool FalkorHWPFFix::runOnMachineFunction(MachineFunction &Fn) { if (skipFunction(Fn.getFunction())) return false; - TII = static_cast(ST.getInstrInfo()); + TII = ST.getInstrInfo(); TRI = ST.getRegisterInfo(); MachineLoopInfo &LI = getAnalysis().getLI(); diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp index e6b22695761e7..3b4c7a05d1d4b 100644 --- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp +++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp @@ -3078,7 +3078,7 @@ bool AArch64LoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) { return false; Subtarget = &Fn.getSubtarget(); - TII = static_cast(Subtarget->getInstrInfo()); + TII = Subtarget->getInstrInfo(); TRI = Subtarget->getRegisterInfo(); AA = &getAnalysis().getAAResults(); diff --git a/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp b/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp index c9e729025c709..dd775da97112d 100644 --- a/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp +++ b/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp @@ -133,7 +133,7 @@ bool AArch64StorePairSuppress::runOnMachineFunction(MachineFunction &MF) { if (!ST.enableStorePairSuppress()) return false; - TII = static_cast(ST.getInstrInfo()); + TII = ST.getInstrInfo(); TRI = ST.getRegisterInfo(); MRI = &MF.getRegInfo(); SchedModel.init(&ST);